
<!doctype html>
<head><meta charset="utf-8">
<link rel="icon" href="img/favicon.ico">
<link href="ecmarkup.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/github.min.css">
<script src="ecmarkup.js"></script>
<script>
  if (location.hostname === 'tc39.github.io' && location.protocol !== 'https:') {
    location.protocol = 'https:';
  }
</script>
<style>
h1.orange {
  font-size: 2em;
}
.oldtoc {
  padding: 5em;
}
.orange {
  color: #ff6600;
  margin: 0px;
}
.list-of-names {
  list-style-type: none;
  margin-bottom: 10px;
  padding-left: 10px;
}
emu-normative-optional {
  border-left: 5px solid #ff6600;
  padding: .5em;
  display: block;
  background: #ffeedd;
}
emu-normative-optional:before {
  display: block;
  color: #884400;
  content: "NORMATIVE OPTIONAL";
}
#metadata-block {
  margin: 4em 0;
  padding: 10px;
  border: 1px solid #ee8421;
}
#metadata-block h1 {
  font-size: 1.5em;
  margin-top: 0;
}
#metadata-block > ul {
  list-style-type: none;
  margin: 0; padding: 0;
}
#ecma-logo {
  width: 500px;
}
</style>

<title>ECMAScript® 2019 Internationalization API Specification</title><script type="application/json" id="menu-search-biblio">[{"type":"clause","id":"introduction","aoid":null,"title":"Introduction","titleHTML":"Introduction","number":"","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Introduction"},{"type":"clause","id":"scope","aoid":null,"title":"Scope","titleHTML":"Scope","number":"1","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Scope"},{"type":"clause","id":"conformance","aoid":null,"title":"Conformance","titleHTML":"Conformance","number":"2","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_72"],"key":"Conformance"},{"type":"clause","id":"normative-references","aoid":null,"title":"Normative References","titleHTML":"Normative References","number":"3","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Normative References"},{"type":"clause","id":"sec-internationalization-localization-globalization","aoid":null,"title":"Internationalization, Localization, and Globalization","titleHTML":"Internationalization, Localization, and Globalization","number":"4.1","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Internationalization, Localization, and Globalization"},{"type":"clause","id":"sec-api-overview","aoid":null,"title":"API Overview","titleHTML":"API Overview","number":"4.2","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"API Overview"},{"type":"clause","id":"sec-compatibility","aoid":null,"title":"Compatibility across implementations","titleHTML":"Compatibility across implementations","number":"4.3.1","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Compatibility across implementations"},{"type":"clause","id":"sec-implementation-dependencies","aoid":null,"title":"Implementation Dependencies","titleHTML":"Implementation Dependencies","number":"4.3","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Implementation Dependencies"},{"type":"clause","id":"overview","aoid":null,"title":"Overview","titleHTML":"Overview","number":"4","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Overview"},{"type":"table","id":"table-402-well-known-intrinsic-objects","number":1,"caption":"Table 1: Well-known Intrinsic Objects (Extensions)","referencingIds":[],"namespace":"https://tc39.github.io/ecma402/","location":"","key":"Table 1: Well-known Intrinsic Objects (Extensions)"},{"type":"term","term":"%Date_now%","refId":"sec-402-well-known-intrinsic-objects","referencingIds":[],"namespace":"https://tc39.github.io/ecma402/","location":"","key":"%Date_now%"},{"type":"term","term":"%StringProto_indexOf%","refId":"sec-402-well-known-intrinsic-objects","referencingIds":[],"namespace":"https://tc39.github.io/ecma402/","location":"","key":"%StringProto_indexOf%"},{"type":"clause","id":"sec-402-well-known-intrinsic-objects","aoid":null,"title":"Well-Known Intrinsic Objects","titleHTML":"Well-Known Intrinsic Objects","number":"5.1","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_141","_ref_143","_ref_145","_ref_155","_ref_238","_ref_240","_ref_243","_ref_245","_ref_309","_ref_324","_ref_326","_ref_330","_ref_360","_ref_381"],"key":"Well-Known Intrinsic Objects"},{"type":"clause","id":"conventions","aoid":null,"title":"Notational Conventions","titleHTML":"Notational Conventions","number":"5","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Notational Conventions"},{"type":"clause","id":"sec-case-sensitivity-and-case-mapping","aoid":null,"title":"Case Sensitivity and Case Mapping","titleHTML":"Case Sensitivity and Case Mapping","number":"6.1","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_13","_ref_14","_ref_15","_ref_16","_ref_17","_ref_37"],"key":"Case Sensitivity and Case Mapping"},{"type":"clause","id":"sec-unicode-locale-extension-sequences","aoid":null,"title":"Unicode Locale Extension Sequences","titleHTML":"Unicode Locale Extension Sequences","number":"6.2.1","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_71"],"key":"Unicode Locale Extension Sequences"},{"type":"op","aoid":"IsStructurallyValidLanguageTag","refId":"sec-isstructurallyvalidlanguagetag","location":"","referencingIds":[],"key":"IsStructurallyValidLanguageTag"},{"type":"clause","id":"sec-isstructurallyvalidlanguagetag","aoid":"IsStructurallyValidLanguageTag","title":"IsStructurallyValidLanguageTag ( locale )","titleHTML":"IsStructurallyValidLanguageTag ( <var>locale</var> )","number":"6.2.2","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_11","_ref_24","_ref_118","_ref_133","_ref_156"],"key":"IsStructurallyValidLanguageTag ( locale )"},{"type":"op","aoid":"CanonicalizeLanguageTag","refId":"sec-canonicalizelanguagetag","location":"","referencingIds":[],"key":"CanonicalizeLanguageTag"},{"type":"clause","id":"sec-canonicalizelanguagetag","aoid":"CanonicalizeLanguageTag","title":"CanonicalizeLanguageTag ( locale )","titleHTML":"CanonicalizeLanguageTag ( <var>locale</var> )","number":"6.2.3","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_12","_ref_25","_ref_73","_ref_134","_ref_157"],"key":"CanonicalizeLanguageTag ( locale )"},{"type":"op","aoid":"DefaultLocale","refId":"sec-defaultlocale","location":"","referencingIds":[],"key":"DefaultLocale"},{"type":"clause","id":"sec-defaultlocale","aoid":"DefaultLocale","title":"DefaultLocale ()","titleHTML":"DefaultLocale ()","number":"6.2.4","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_26","_ref_74","_ref_122","_ref_137","_ref_415"],"key":"DefaultLocale ()"},{"type":"clause","id":"sec-language-tags","aoid":null,"title":"Language Tags","titleHTML":"Language Tags","number":"6.2","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Language Tags"},{"type":"op","aoid":"IsWellFormedCurrencyCode","refId":"sec-iswellformedcurrencycode","location":"","referencingIds":[],"key":"IsWellFormedCurrencyCode"},{"type":"clause","id":"sec-iswellformedcurrencycode","aoid":"IsWellFormedCurrencyCode","title":"IsWellFormedCurrencyCode ( currency )","titleHTML":"IsWellFormedCurrencyCode ( <var>currency</var> )","number":"6.3.1","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_227"],"key":"IsWellFormedCurrencyCode ( currency )"},{"type":"clause","id":"sec-currency-codes","aoid":null,"title":"Currency Codes","titleHTML":"Currency Codes","number":"6.3","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Currency Codes"},{"type":"op","aoid":"IsValidTimeZoneName","refId":"sec-isvalidtimezonename","location":"","referencingIds":[],"key":"IsValidTimeZoneName"},{"type":"clause","id":"sec-isvalidtimezonename","aoid":"IsValidTimeZoneName","title":"IsValidTimeZoneName ( timeZone )","titleHTML":"IsValidTimeZoneName ( <var>timeZone</var> )","number":"6.4.1","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_18","_ref_119","_ref_292"],"key":"IsValidTimeZoneName ( timeZone )"},{"type":"op","aoid":"CanonicalizeTimeZoneName","refId":"sec-canonicalizetimezonename","location":"","referencingIds":[],"key":"CanonicalizeTimeZoneName"},{"type":"clause","id":"sec-canonicalizetimezonename","aoid":"CanonicalizeTimeZoneName","title":"CanonicalizeTimeZoneName","titleHTML":"CanonicalizeTimeZoneName","number":"6.4.2","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_19","_ref_293"],"key":"CanonicalizeTimeZoneName"},{"type":"op","aoid":"DefaultTimeZone","refId":"sec-defaulttimezone","location":"","referencingIds":[],"key":"DefaultTimeZone"},{"type":"clause","id":"sec-defaulttimezone","aoid":"DefaultTimeZone","title":"DefaultTimeZone ()","titleHTML":"DefaultTimeZone ()","number":"6.4.3","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_75","_ref_294"],"key":"DefaultTimeZone ()"},{"type":"clause","id":"sec-time-zone-names","aoid":null,"title":"Time Zone Names","titleHTML":"Time Zone Names","number":"6.4","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Time Zone Names"},{"type":"clause","id":"locales-currencies-tz","aoid":null,"title":"Identification of Locales, Currencies, and Time Zones","titleHTML":"Identification of Locales, Currencies, and Time Zones","number":"6","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Identification of Locales, Currencies, and Time Zones"},{"type":"clause","id":"requirements","aoid":null,"title":"Requirements for Standard Built-in ECMAScript Objects","titleHTML":"Requirements for Standard Built-in ECMAScript Objects","number":"7","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Requirements for Standard Built-in ECMAScript Objects"},{"type":"term","term":"%Intl%","refId":"intl-object","referencingIds":[],"namespace":"https://tc39.github.io/ecma402/","location":"","key":"%Intl%"},{"type":"clause","id":"sec-intl.collator-intro","aoid":null,"title":"Intl.Collator (...)","titleHTML":"Intl.Collator (...)","number":"8.1.1","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Intl.Collator (...)"},{"type":"clause","id":"sec-intl.numberformat-intro","aoid":null,"title":"Intl.NumberFormat (...)","titleHTML":"Intl.NumberFormat (...)","number":"8.1.2","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Intl.NumberFormat (...)"},{"type":"clause","id":"sec-intl.datetimeformat-intro","aoid":null,"title":"Intl.DateTimeFormat (...)","titleHTML":"Intl.DateTimeFormat (...)","number":"8.1.3","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Intl.DateTimeFormat (...)"},{"type":"clause","id":"sec-intl.pluralrules-intro","aoid":null,"title":"Intl.PluralRules (...)","titleHTML":"Intl.PluralRules (...)","number":"8.1.4","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Intl.PluralRules (...)"},{"type":"note","id":"legacy-constructor","number":1,"clauseId":"sec-constructor-properties-of-the-intl-object","referencingIds":["_ref_41","_ref_43","_ref_54","_ref_56"],"namespace":"https://tc39.github.io/ecma402/","location":""},{"type":"clause","id":"sec-constructor-properties-of-the-intl-object","aoid":null,"title":"Constructor Properties of the Intl Object","titleHTML":"Constructor Properties of the Intl Object","number":"8.1","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Constructor Properties of the Intl Object"},{"type":"clause","id":"sec-intl.getcanonicallocales","aoid":null,"title":"Intl.getCanonicalLocales ( locales )","titleHTML":"Intl.getCanonicalLocales ( <var>locales</var> )","number":"8.2.1","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Intl.getCanonicalLocales ( locales )"},{"type":"clause","id":"sec-function-properties-of-the-intl-object","aoid":null,"title":"Function Properties of the Intl Object","titleHTML":"Function Properties of the Intl Object","number":"8.2","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Function Properties of the Intl Object"},{"type":"clause","id":"intl-object","aoid":null,"title":"The Intl Object","titleHTML":"The Intl Object","number":"8","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_2","_ref_105","_ref_258","_ref_265","_ref_343","_ref_350"],"key":"The Intl Object"},{"type":"clause","id":"sec-internal-slots","aoid":null,"title":"Internal slots of Service Constructors","titleHTML":"Internal slots of Service Constructors","number":"9.1","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_29","_ref_30","_ref_31","_ref_32","_ref_42","_ref_44","_ref_45","_ref_55","_ref_57","_ref_58","_ref_66","_ref_67","_ref_68","_ref_76"],"key":"Internal slots of Service Constructors"},{"type":"op","aoid":"CanonicalizeLocaleList","refId":"sec-canonicalizelocalelist","location":"","referencingIds":[],"key":"CanonicalizeLocaleList"},{"type":"clause","id":"sec-canonicalizelocalelist","aoid":"CanonicalizeLocaleList","title":"CanonicalizeLocaleList ( locales )","titleHTML":"CanonicalizeLocaleList ( <var>locales</var> )","number":"9.2.1","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_120","_ref_135","_ref_138","_ref_171","_ref_193","_ref_217","_ref_268","_ref_281","_ref_353","_ref_368","_ref_394","_ref_414"],"key":"CanonicalizeLocaleList ( locales )"},{"type":"op","aoid":"BestAvailableLocale","refId":"sec-bestavailablelocale","location":"","referencingIds":[],"key":"BestAvailableLocale"},{"type":"clause","id":"sec-bestavailablelocale","aoid":"BestAvailableLocale","title":"BestAvailableLocale ( availableLocales, locale )","titleHTML":"BestAvailableLocale ( <var>availableLocales</var>, <var>locale</var> )","number":"9.2.2","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_136","_ref_158","_ref_416"],"key":"BestAvailableLocale ( availableLocales, locale )"},{"type":"op","aoid":"LookupMatcher","refId":"sec-lookupmatcher","location":"","referencingIds":[],"key":"LookupMatcher"},{"type":"clause","id":"sec-lookupmatcher","aoid":"LookupMatcher","title":"LookupMatcher ( availableLocales, requestedLocales )","titleHTML":"LookupMatcher ( <var>availableLocales</var>, <var>requestedLocales</var> )","number":"9.2.3","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_139","_ref_146"],"key":"LookupMatcher ( availableLocales, requestedLocales )"},{"type":"op","aoid":"BestFitMatcher","refId":"sec-bestfitmatcher","location":"","referencingIds":[],"key":"BestFitMatcher"},{"type":"clause","id":"sec-bestfitmatcher","aoid":"BestFitMatcher","title":"BestFitMatcher ( availableLocales, requestedLocales )","titleHTML":"BestFitMatcher ( <var>availableLocales</var>, <var>requestedLocales</var> )","number":"9.2.4","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_77","_ref_147","_ref_444"],"key":"BestFitMatcher ( availableLocales, requestedLocales )"},{"type":"op","aoid":"UnicodeExtensionValue","refId":"sec-unicodeextensionvalue","location":"","referencingIds":[],"key":"UnicodeExtensionValue"},{"type":"clause","id":"sec-unicodeextensionvalue","aoid":"UnicodeExtensionValue","title":"UnicodeExtensionValue ( extension, key )","titleHTML":"UnicodeExtensionValue ( <var>extension</var>, <var>key</var> )","number":"9.2.5","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_151"],"key":"UnicodeExtensionValue ( extension, key )"},{"type":"op","aoid":"ResolveLocale","refId":"sec-resolvelocale","location":"","referencingIds":[],"key":"ResolveLocale"},{"type":"clause","id":"sec-resolvelocale","aoid":"ResolveLocale","title":"ResolveLocale ( availableLocales, requestedLocales, options, relevantExtensionKeys, localeData )","titleHTML":"ResolveLocale ( <var>availableLocales</var>, <var>requestedLocales</var>, <var>options</var>, <var>relevantExtensionKeys</var>, <var>localeData</var> )","number":"9.2.6","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_27","_ref_182","_ref_222","_ref_287","_ref_375"],"key":"ResolveLocale ( availableLocales, requestedLocales, options, relevantExtensionKeys, localeData )"},{"type":"op","aoid":"LookupSupportedLocales","refId":"sec-lookupsupportedlocales","location":"","referencingIds":[],"key":"LookupSupportedLocales"},{"type":"clause","id":"sec-lookupsupportedlocales","aoid":"LookupSupportedLocales","title":"LookupSupportedLocales ( availableLocales, requestedLocales )","titleHTML":"LookupSupportedLocales ( <var>availableLocales</var>, <var>requestedLocales</var> )","number":"9.2.7","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_162"],"key":"LookupSupportedLocales ( availableLocales, requestedLocales )"},{"type":"op","aoid":"BestFitSupportedLocales","refId":"sec-bestfitsupportedlocales","location":"","referencingIds":[],"key":"BestFitSupportedLocales"},{"type":"clause","id":"sec-bestfitsupportedlocales","aoid":"BestFitSupportedLocales","title":"BestFitSupportedLocales ( availableLocales, requestedLocales )","titleHTML":"BestFitSupportedLocales ( <var>availableLocales</var>, <var>requestedLocales</var> )","number":"9.2.8","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_78","_ref_161","_ref_445"],"key":"BestFitSupportedLocales ( availableLocales, requestedLocales )"},{"type":"op","aoid":"SupportedLocales","refId":"sec-supportedlocales","location":"","referencingIds":[],"key":"SupportedLocales"},{"type":"clause","id":"sec-supportedlocales","aoid":"SupportedLocales","title":"SupportedLocales ( availableLocales, requestedLocales, options )","titleHTML":"SupportedLocales ( <var>availableLocales</var>, <var>requestedLocales</var>, <var>options</var> )","number":"9.2.9","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_194","_ref_269","_ref_354","_ref_395"],"key":"SupportedLocales ( availableLocales, requestedLocales, options )"},{"type":"op","aoid":"GetOption","refId":"sec-getoption","location":"","referencingIds":[],"key":"GetOption"},{"type":"clause","id":"sec-getoption","aoid":"GetOption","title":"GetOption ( options, property, type, values, fallback )","titleHTML":"GetOption ( <var>options</var>, <var>property</var>, <var>type</var>, <var>values</var>, <var>fallback</var> )","number":"9.2.10","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_160","_ref_174","_ref_177","_ref_178","_ref_180","_ref_185","_ref_186","_ref_220","_ref_225","_ref_226","_ref_229","_ref_231","_ref_283","_ref_284","_ref_285","_ref_295","_ref_296","_ref_371","_ref_372"],"key":"GetOption ( options, property, type, values, fallback )"},{"type":"op","aoid":"DefaultNumberOption","refId":"sec-defaultnumberoption","location":"","referencingIds":[],"key":"DefaultNumberOption"},{"type":"clause","id":"sec-defaultnumberoption","aoid":"DefaultNumberOption","title":"DefaultNumberOption ( value, minimum, maximum, fallback )","titleHTML":"DefaultNumberOption ( <var>value</var>, <var>minimum</var>, <var>maximum</var>, <var>fallback</var> )","number":"9.2.11","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_170","_ref_215","_ref_216"],"key":"DefaultNumberOption ( value, minimum, maximum, fallback )"},{"type":"op","aoid":"GetNumberOption","refId":"sec-getnumberoption","location":"","referencingIds":[],"key":"GetNumberOption"},{"type":"clause","id":"sec-getnumberoption","aoid":"GetNumberOption","title":"GetNumberOption ( options, property, minimum, maximum, fallback )","titleHTML":"GetNumberOption ( <var>options</var>, <var>property</var>, <var>minimum</var>, <var>maximum</var>, <var>fallback</var> )","number":"9.2.12","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_210","_ref_211","_ref_212"],"key":"GetNumberOption ( options, property, minimum, maximum, fallback )"},{"type":"clause","id":"sec-abstract-operations","aoid":null,"title":"Abstract Operations","titleHTML":"Abstract Operations","number":"9.2","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Abstract Operations"},{"type":"clause","id":"locale-and-parameter-negotiation","aoid":null,"title":"Locale and Parameter Negotiation","titleHTML":"Locale and Parameter Negotiation","number":"9","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Locale and Parameter Negotiation"},{"type":"term","term":"%Collator%","refId":"sec-the-intl-collator-constructor","referencingIds":[],"namespace":"https://tc39.github.io/ecma402/","location":"","key":"%Collator%"},{"type":"op","aoid":"InitializeCollator","refId":"sec-initializecollator","location":"","referencingIds":[],"key":"InitializeCollator"},{"type":"clause","id":"sec-initializecollator","aoid":"InitializeCollator","title":"InitializeCollator ( collator, locales, options )","titleHTML":"InitializeCollator ( <var>collator</var>, <var>locales</var>, <var>options</var> )","number":"10.1.1","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_79","_ref_190"],"key":"InitializeCollator ( collator, locales, options )"},{"type":"clause","id":"sec-intl.collator","aoid":null,"title":"Intl.Collator ( [ locales [ , options ] ] )","titleHTML":"Intl.Collator ( [ <var>locales</var> [ , <var>options</var> ] ] )","number":"10.1.2","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Intl.Collator ( [ locales [ , options ] ] )"},{"type":"clause","id":"sec-the-intl-collator-constructor","aoid":null,"title":"The Intl.Collator Constructor","titleHTML":"The Intl.Collator Constructor","number":"10.1","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_3","_ref_101","_ref_106","_ref_108","_ref_175","_ref_176","_ref_181","_ref_183","_ref_187","_ref_188","_ref_192","_ref_195","_ref_203","_ref_410"],"key":"The Intl.Collator Constructor"},{"type":"clause","id":"sec-intl.collator.prototype","aoid":null,"title":"Intl.Collator.prototype","titleHTML":"Intl.Collator.prototype","number":"10.2.1","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_4"],"key":"Intl.Collator.prototype"},{"type":"clause","id":"sec-intl.collator.supportedlocalesof","aoid":null,"title":"Intl.Collator.supportedLocalesOf ( locales [ , options ] )","titleHTML":"Intl.Collator.supportedLocalesOf ( <var>locales</var> [ , <var>options</var> ] )","number":"10.2.2","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Intl.Collator.supportedLocalesOf ( locales [ , options ] )"},{"type":"clause","id":"sec-intl-collator-internal-slots","aoid":null,"title":"Internal Slots","titleHTML":"Internal Slots","number":"10.2.3","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_80","_ref_81","_ref_82","_ref_83"],"key":"Internal Slots"},{"type":"clause","id":"sec-properties-of-the-intl-collator-constructor","aoid":null,"title":"Properties of the Intl.Collator Constructor","titleHTML":"Properties of the Intl.Collator Constructor","number":"10.2","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Properties of the Intl.Collator Constructor"},{"type":"term","term":"%CollatorPrototype%","refId":"sec-properties-of-the-intl-collator-prototype-object","referencingIds":[],"namespace":"https://tc39.github.io/ecma402/","location":"","key":"%CollatorPrototype%"},{"type":"clause","id":"sec-intl.collator.prototype.constructor","aoid":null,"title":"Intl.Collator.prototype.constructor","titleHTML":"Intl.Collator.prototype.constructor","number":"10.3.1","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Intl.Collator.prototype.constructor"},{"type":"clause","id":"sec-intl.collator.prototype-@@tostringtag","aoid":null,"title":"Intl.Collator.prototype [ @@toStringTag ]","titleHTML":"Intl.Collator.prototype [ @@toStringTag ]","number":"10.3.2","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Intl.Collator.prototype [ @@toStringTag ]"},{"type":"clause","id":"sec-collator-compare-functions","aoid":null,"title":"Collator Compare Functions","titleHTML":"Collator Compare Functions","number":"10.3.3.1","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_33","_ref_84"],"key":"Collator Compare Functions"},{"type":"op","aoid":"CompareStrings","refId":"sec-collator-comparestrings","location":"","referencingIds":[],"key":"CompareStrings"},{"type":"clause","id":"sec-collator-comparestrings","aoid":"CompareStrings","title":"CompareStrings ( collator, x, y )","titleHTML":"CompareStrings ( <var>collator</var>, <var>x</var>, <var>y</var> )","number":"10.3.3.2","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_200","_ref_411"],"key":"CompareStrings ( collator, x, y )"},{"type":"clause","id":"sec-intl.collator.prototype.compare","aoid":null,"title":"get Intl.Collator.prototype.compare","titleHTML":"get Intl.Collator.prototype.compare","number":"10.3.3","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_36"],"key":"get Intl.Collator.prototype.compare"},{"type":"table","id":"table-collator-resolvedoptions-properties","number":2,"caption":"Table 2: Resolved Options of Collator Instances","referencingIds":["_ref_34","_ref_35"],"namespace":"https://tc39.github.io/ecma402/","location":"","key":"Table 2: Resolved Options of Collator Instances"},{"type":"clause","id":"sec-intl.collator.prototype.resolvedoptions","aoid":null,"title":"Intl.Collator.prototype.resolvedOptions ()","titleHTML":"Intl.Collator.prototype.resolvedOptions ()","number":"10.3.4","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Intl.Collator.prototype.resolvedOptions ()"},{"type":"clause","id":"sec-properties-of-the-intl-collator-prototype-object","aoid":null,"title":"Properties of the Intl.Collator Prototype Object","titleHTML":"Properties of the Intl.Collator Prototype Object","number":"10.3","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_107","_ref_191","_ref_205"],"key":"Properties of the Intl.Collator Prototype Object"},{"type":"clause","id":"sec-properties-of-intl-collator-instances","aoid":null,"title":"Properties of Intl.Collator Instances","titleHTML":"Properties of Intl.Collator Instances","number":"10.4","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Properties of Intl.Collator Instances"},{"type":"clause","id":"collator-objects","aoid":null,"title":"Collator Objects","titleHTML":"Collator Objects","number":"10","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_20"],"key":"Collator Objects"},{"type":"op","aoid":"SetNumberFormatDigitOptions","refId":"sec-setnfdigitoptions","location":"","referencingIds":[],"key":"SetNumberFormatDigitOptions"},{"type":"clause","id":"sec-setnfdigitoptions","aoid":"SetNumberFormatDigitOptions","title":"SetNumberFormatDigitOptions ( intlObj, options, mnfdDefault, mxfdDefault )","titleHTML":"SetNumberFormatDigitOptions ( <var>intlObj</var>, <var>options</var>, <var>mnfdDefault</var>, <var>mxfdDefault</var> )","number":"11.1.1","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_230","_ref_373"],"key":"SetNumberFormatDigitOptions ( intlObj, options, mnfdDefault, mxfdDefault )"},{"type":"op","aoid":"InitializeNumberFormat","refId":"sec-initializenumberformat","location":"","referencingIds":[],"key":"InitializeNumberFormat"},{"type":"clause","id":"sec-initializenumberformat","aoid":"InitializeNumberFormat","title":"InitializeNumberFormat ( numberFormat, locales, options )","titleHTML":"InitializeNumberFormat ( <var>numberFormat</var>, <var>locales</var>, <var>options</var> )","number":"11.1.2","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_261"],"key":"InitializeNumberFormat ( numberFormat, locales, options )"},{"type":"op","aoid":"CurrencyDigits","refId":"sec-currencydigits","location":"","referencingIds":[],"key":"CurrencyDigits"},{"type":"clause","id":"sec-currencydigits","aoid":"CurrencyDigits","title":"CurrencyDigits ( currency )","titleHTML":"CurrencyDigits ( <var>currency</var> )","number":"11.1.3","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_228"],"key":"CurrencyDigits ( currency )"},{"type":"clause","id":"sec-number-format-functions","aoid":null,"title":"Number Format Functions","titleHTML":"Number Format Functions","number":"11.1.4","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_46"],"key":"Number Format Functions"},{"type":"op","aoid":"FormatNumberToString","refId":"sec-formatnumberstring","location":"","referencingIds":[],"key":"FormatNumberToString"},{"type":"clause","id":"sec-formatnumberstring","aoid":"FormatNumberToString","title":"FormatNumberToString ( intlObject, x )","titleHTML":"FormatNumberToString ( <var>intlObject</var>, <var>x</var> )","number":"11.1.5","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_241","_ref_387"],"key":"FormatNumberToString ( intlObject, x )"},{"type":"table","id":"table-numbering-system-digits","number":3,"caption":"Table 3: Numbering systems with simple digit mappings","referencingIds":["_ref_39","_ref_40","_ref_88"],"namespace":"https://tc39.github.io/ecma402/","location":"","key":"Table 3: Numbering systems with simple digit mappings"},{"type":"op","aoid":"PartitionNumberPattern","refId":"sec-partitionnumberpattern","location":"","referencingIds":[],"key":"PartitionNumberPattern"},{"type":"clause","id":"sec-partitionnumberpattern","aoid":"PartitionNumberPattern","title":"PartitionNumberPattern ( numberFormat, x )","titleHTML":"PartitionNumberPattern ( <var>numberFormat</var>, <var>x</var> )","number":"11.1.6","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_246","_ref_247"],"key":"PartitionNumberPattern ( numberFormat, x )"},{"type":"op","aoid":"FormatNumber","refId":"sec-formatnumber","location":"","referencingIds":[],"key":"FormatNumber"},{"type":"clause","id":"sec-formatnumber","aoid":"FormatNumber","title":"FormatNumber( numberFormat, x )","titleHTML":"FormatNumber( <var>numberFormat</var>, <var>x</var> )","number":"11.1.7","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_86","_ref_87","_ref_89","_ref_90","_ref_91","_ref_92","_ref_234","_ref_327","_ref_328","_ref_419"],"key":"FormatNumber( numberFormat, x )"},{"type":"op","aoid":"FormatNumberToParts","refId":"sec-formatnumbertoparts","location":"","referencingIds":[],"key":"FormatNumberToParts"},{"type":"clause","id":"sec-formatnumbertoparts","aoid":"FormatNumberToParts","title":"FormatNumberToParts( numberFormat, x )","titleHTML":"FormatNumberToParts( <var>numberFormat</var>, <var>x</var> )","number":"11.1.8","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_275"],"key":"FormatNumberToParts( numberFormat, x )"},{"type":"op","aoid":"ToRawPrecision","refId":"sec-torawprecision","location":"","referencingIds":[],"key":"ToRawPrecision"},{"type":"clause","id":"sec-torawprecision","aoid":"ToRawPrecision","title":"ToRawPrecision( x, minPrecision, maxPrecision )","titleHTML":"ToRawPrecision( <var>x</var>, <var>minPrecision</var>, <var>maxPrecision</var> )","number":"11.1.9","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_235"],"key":"ToRawPrecision( x, minPrecision, maxPrecision )"},{"type":"op","aoid":"ToRawFixed","refId":"sec-torawfixed","location":"","referencingIds":[],"key":"ToRawFixed"},{"type":"clause","id":"sec-torawfixed","aoid":"ToRawFixed","title":"ToRawFixed( x, minInteger, minFraction, maxFraction )","titleHTML":"ToRawFixed( <var>x</var>, <var>minInteger</var>, <var>minFraction</var>, <var>maxFraction</var> )","number":"11.1.10","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_236"],"key":"ToRawFixed( x, minInteger, minFraction, maxFraction )"},{"type":"op","aoid":"UnwrapNumberFormat","refId":"sec-unwrapnumberformat","location":"","referencingIds":[],"key":"UnwrapNumberFormat"},{"type":"clause","id":"sec-unwrapnumberformat","aoid":"UnwrapNumberFormat","title":"UnwrapNumberFormat( nf )","titleHTML":"UnwrapNumberFormat( <var>nf</var> )","number":"11.1.11","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_272","_ref_277"],"key":"UnwrapNumberFormat( nf )"},{"type":"clause","id":"sec-numberformat-abstracts","aoid":null,"title":"Abstract Operations For NumberFormat Objects","titleHTML":"Abstract Operations For NumberFormat Objects","number":"11.1","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Abstract Operations For NumberFormat Objects"},{"type":"term","term":"%NumberFormat%","refId":"sec-intl-numberformat-constructor","referencingIds":[],"namespace":"https://tc39.github.io/ecma402/","location":"","key":"%NumberFormat%"},{"type":"clause","id":"sec-intl.numberformat","aoid":null,"title":"Intl.NumberFormat ( [ locales [ , options ] ] )","titleHTML":"Intl.NumberFormat ( [ <var>locales</var> [ , <var>options</var> ] ] )","number":"11.2.1","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Intl.NumberFormat ( [ locales [ , options ] ] )"},{"type":"clause","id":"sec-intl-numberformat-constructor","aoid":null,"title":"The Intl.NumberFormat Constructor","titleHTML":"The Intl.NumberFormat Constructor","number":"11.2","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_5","_ref_102","_ref_109","_ref_111","_ref_221","_ref_223","_ref_224","_ref_256","_ref_263","_ref_267","_ref_270","_ref_316","_ref_321","_ref_418"],"key":"The Intl.NumberFormat Constructor"},{"type":"clause","id":"sec-intl.numberformat.prototype","aoid":null,"title":"Intl.NumberFormat.prototype","titleHTML":"Intl.NumberFormat.prototype","number":"11.3.1","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_6"],"key":"Intl.NumberFormat.prototype"},{"type":"clause","id":"sec-intl.numberformat.supportedlocalesof","aoid":null,"title":"Intl.NumberFormat.supportedLocalesOf ( locales [ , options ] )","titleHTML":"Intl.NumberFormat.supportedLocalesOf ( <var>locales</var> [ , <var>options</var> ] )","number":"11.3.2","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Intl.NumberFormat.supportedLocalesOf ( locales [ , options ] )"},{"type":"clause","id":"sec-intl.numberformat-internal-slots","aoid":null,"title":"Internal slots","titleHTML":"Internal slots","number":"11.3.3","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_38","_ref_48","_ref_85"],"key":"Internal slots"},{"type":"clause","id":"sec-properties-of-intl-numberformat-constructor","aoid":null,"title":"Properties of the Intl.NumberFormat Constructor","titleHTML":"Properties of the Intl.NumberFormat Constructor","number":"11.3","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Properties of the Intl.NumberFormat Constructor"},{"type":"term","term":"%NumberFormatPrototype%","refId":"sec-properties-of-intl-numberformat-prototype-object","referencingIds":[],"namespace":"https://tc39.github.io/ecma402/","location":"","key":"%NumberFormatPrototype%"},{"type":"clause","id":"sec-intl.numberformat.prototype.constructor","aoid":null,"title":"Intl.NumberFormat.prototype.constructor","titleHTML":"Intl.NumberFormat.prototype.constructor","number":"11.4.1","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Intl.NumberFormat.prototype.constructor"},{"type":"clause","id":"sec-intl.numberformat.prototype-@@tostringtag","aoid":null,"title":"Intl.NumberFormat.prototype [ @@toStringTag ]","titleHTML":"Intl.NumberFormat.prototype [ @@toStringTag ]","number":"11.4.2","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Intl.NumberFormat.prototype [ @@toStringTag ]"},{"type":"clause","id":"sec-intl.numberformat.prototype.format","aoid":null,"title":"get Intl.NumberFormat.prototype.format","titleHTML":"get Intl.NumberFormat.prototype.format","number":"11.4.3","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_49"],"key":"get Intl.NumberFormat.prototype.format"},{"type":"clause","id":"sec-intl.numberformat.prototype.formattoparts","aoid":null,"title":"Intl.NumberFormat.prototype.formatToParts ( value )","titleHTML":"Intl.NumberFormat.prototype.formatToParts ( <var>value</var> )","number":"11.4.4","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Intl.NumberFormat.prototype.formatToParts ( value )"},{"type":"table","id":"table-numberformat-resolvedoptions-properties","number":4,"caption":"Table 4: Resolved Options of NumberFormat Instances","referencingIds":["_ref_47"],"namespace":"https://tc39.github.io/ecma402/","location":"","key":"Table 4: Resolved Options of NumberFormat Instances"},{"type":"clause","id":"sec-intl.numberformat.prototype.resolvedoptions","aoid":null,"title":"Intl.NumberFormat.prototype.resolvedOptions ()","titleHTML":"Intl.NumberFormat.prototype.resolvedOptions ()","number":"11.4.5","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Intl.NumberFormat.prototype.resolvedOptions ()"},{"type":"clause","id":"sec-properties-of-intl-numberformat-prototype-object","aoid":null,"title":"Properties of the Intl.NumberFormat Prototype Object","titleHTML":"Properties of the Intl.NumberFormat Prototype Object","number":"11.4","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_110","_ref_266","_ref_280"],"key":"Properties of the Intl.NumberFormat Prototype Object"},{"type":"clause","id":"sec-properties-of-intl-numberformat-instances","aoid":null,"title":"Properties of Intl.NumberFormat Instances","titleHTML":"Properties of Intl.NumberFormat Instances","number":"11.5","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Properties of Intl.NumberFormat Instances"},{"type":"clause","id":"numberformat-objects","aoid":null,"title":"NumberFormat Objects","titleHTML":"NumberFormat Objects","number":"11","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_21"],"key":"NumberFormat Objects"},{"type":"table","id":"table-datetimeformat-components","number":5,"caption":"Table 5: Components of date and time formats","referencingIds":["_ref_1","_ref_50","_ref_51","_ref_52","_ref_53","_ref_59","_ref_60","_ref_63"],"namespace":"https://tc39.github.io/ecma402/","location":"","key":"Table 5: Components of date and time formats"},{"type":"op","aoid":"InitializeDateTimeFormat","refId":"sec-initializedatetimeformat","location":"","referencingIds":[],"key":"InitializeDateTimeFormat"},{"type":"clause","id":"sec-initializedatetimeformat","aoid":"InitializeDateTimeFormat","title":"InitializeDateTimeFormat ( dateTimeFormat, locales, options )","titleHTML":"InitializeDateTimeFormat ( <var>dateTimeFormat</var>, <var>locales</var>, <var>options</var> )","number":"12.1.1","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_93","_ref_346"],"key":"InitializeDateTimeFormat ( dateTimeFormat, locales, options )"},{"type":"op","aoid":"ToDateTimeOptions","refId":"sec-todatetimeoptions","location":"","referencingIds":[],"key":"ToDateTimeOptions"},{"type":"clause","id":"sec-todatetimeoptions","aoid":"ToDateTimeOptions","title":"ToDateTimeOptions ( options, required, defaults )","titleHTML":"ToDateTimeOptions ( <var>options</var>, <var>required</var>, <var>defaults</var> )","number":"12.1.2","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_282","_ref_422","_ref_427","_ref_432"],"key":"ToDateTimeOptions ( options, required, defaults )"},{"type":"op","aoid":"BasicFormatMatcher","refId":"sec-basicformatmatcher","location":"","referencingIds":[],"key":"BasicFormatMatcher"},{"type":"clause","id":"sec-basicformatmatcher","aoid":"BasicFormatMatcher","title":"BasicFormatMatcher ( options, formats )","titleHTML":"BasicFormatMatcher ( <var>options</var>, <var>formats</var> )","number":"12.1.3","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_297","_ref_306"],"key":"BasicFormatMatcher ( options, formats )"},{"type":"op","aoid":"BestFitFormatMatcher","refId":"sec-bestfitformatmatcher","location":"","referencingIds":[],"key":"BestFitFormatMatcher"},{"type":"clause","id":"sec-bestfitformatmatcher","aoid":"BestFitFormatMatcher","title":"BestFitFormatMatcher ( options, formats )","titleHTML":"BestFitFormatMatcher ( <var>options</var>, <var>formats</var> )","number":"12.1.4","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_298","_ref_446"],"key":"BestFitFormatMatcher ( options, formats )"},{"type":"clause","id":"sec-datetime-format-functions","aoid":null,"title":"DateTime Format Functions","titleHTML":"DateTime Format Functions","number":"12.1.5","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_61"],"key":"DateTime Format Functions"},{"type":"op","aoid":"PartitionDateTimePattern","refId":"sec-partitiondatetimepattern","location":"","referencingIds":[],"key":"PartitionDateTimePattern"},{"type":"clause","id":"sec-partitiondatetimepattern","aoid":"PartitionDateTimePattern","title":"PartitionDateTimePattern ( dateTimeFormat, x )","titleHTML":"PartitionDateTimePattern ( <var>dateTimeFormat</var>, <var>x</var> )","number":"12.1.6","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_331","_ref_332"],"key":"PartitionDateTimePattern ( dateTimeFormat, x )"},{"type":"op","aoid":"FormatDateTime","refId":"sec-formatdatetime","location":"","referencingIds":[],"key":"FormatDateTime"},{"type":"clause","id":"sec-formatdatetime","aoid":"FormatDateTime","title":"FormatDateTime( dateTimeFormat, x )","titleHTML":"FormatDateTime( <var>dateTimeFormat</var>, <var>x</var> )","number":"12.1.7","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_98","_ref_99","_ref_311","_ref_425","_ref_430","_ref_435"],"key":"FormatDateTime( dateTimeFormat, x )"},{"type":"op","aoid":"FormatDateTimeToParts","refId":"sec-formatdatetimetoparts","location":"","referencingIds":[],"key":"FormatDateTimeToParts"},{"type":"clause","id":"sec-formatdatetimetoparts","aoid":"FormatDateTimeToParts","title":"FormatDateTimeToParts ( dateTimeFormat, x )","titleHTML":"FormatDateTimeToParts ( <var>dateTimeFormat</var>, <var>x</var> )","number":"12.1.8","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_362"],"key":"FormatDateTimeToParts ( dateTimeFormat, x )"},{"type":"op","aoid":"ToLocalTime","refId":"sec-tolocaltime","location":"","referencingIds":[],"key":"ToLocalTime"},{"type":"clause","id":"sec-tolocaltime","aoid":"ToLocalTime","title":"ToLocalTime ( date, calendar, timeZone )","titleHTML":"ToLocalTime ( <var>date</var>, <var>calendar</var>, <var>timeZone</var> )","number":"12.1.9","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_322"],"key":"ToLocalTime ( date, calendar, timeZone )"},{"type":"op","aoid":"UnwrapDateTimeFormat","refId":"sec-unwrapdatetimeformat","location":"","referencingIds":[],"key":"UnwrapDateTimeFormat"},{"type":"clause","id":"sec-unwrapdatetimeformat","aoid":"UnwrapDateTimeFormat","title":"UnwrapDateTimeFormat( dtf )","titleHTML":"UnwrapDateTimeFormat( <var>dtf</var> )","number":"12.1.10","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_357","_ref_364"],"key":"UnwrapDateTimeFormat( dtf )"},{"type":"clause","id":"sec-datetimeformat-abstracts","aoid":null,"title":"Abstract Operations For DateTimeFormat Objects","titleHTML":"Abstract Operations For DateTimeFormat Objects","number":"12.1","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Abstract Operations For DateTimeFormat Objects"},{"type":"term","term":"%DateTimeFormat%","refId":"sec-intl-datetimeformat-constructor","referencingIds":[],"namespace":"https://tc39.github.io/ecma402/","location":"","key":"%DateTimeFormat%"},{"type":"clause","id":"sec-intl.datetimeformat","aoid":null,"title":"Intl.DateTimeFormat ( [ locales [ , options ] ] )","titleHTML":"Intl.DateTimeFormat ( [ <var>locales</var> [ , <var>options</var> ] ] )","number":"12.2.1","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Intl.DateTimeFormat ( [ locales [ , options ] ] )"},{"type":"clause","id":"sec-intl-datetimeformat-constructor","aoid":null,"title":"The Intl.DateTimeFormat Constructor","titleHTML":"The Intl.DateTimeFormat Constructor","number":"12.2","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_7","_ref_103","_ref_112","_ref_114","_ref_286","_ref_288","_ref_289","_ref_341","_ref_348","_ref_352","_ref_355","_ref_424","_ref_429","_ref_434"],"key":"The Intl.DateTimeFormat Constructor"},{"type":"clause","id":"sec-intl.datetimeformat.prototype","aoid":null,"title":"Intl.DateTimeFormat.prototype","titleHTML":"Intl.DateTimeFormat.prototype","number":"12.3.1","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_8"],"key":"Intl.DateTimeFormat.prototype"},{"type":"clause","id":"sec-intl.datetimeformat.supportedlocalesof","aoid":null,"title":"Intl.DateTimeFormat.supportedLocalesOf ( locales [ , options ] )","titleHTML":"Intl.DateTimeFormat.supportedLocalesOf ( <var>locales</var> [ , <var>options</var> ] )","number":"12.3.2","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Intl.DateTimeFormat.supportedLocalesOf ( locales [ , options ] )"},{"type":"clause","id":"sec-intl.datetimeformat-internal-slots","aoid":null,"title":"Internal slots","titleHTML":"Internal slots","number":"12.3.3","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_28","_ref_64","_ref_94","_ref_95","_ref_96","_ref_97"],"key":"Internal slots"},{"type":"clause","id":"sec-properties-of-intl-datetimeformat-constructor","aoid":null,"title":"Properties of the Intl.DateTimeFormat Constructor","titleHTML":"Properties of the Intl.DateTimeFormat Constructor","number":"12.3","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Properties of the Intl.DateTimeFormat Constructor"},{"type":"term","term":"%DateTimeFormatPrototype%","refId":"sec-properties-of-intl-datetimeformat-prototype-object","referencingIds":[],"namespace":"https://tc39.github.io/ecma402/","location":"","key":"%DateTimeFormatPrototype%"},{"type":"clause","id":"sec-intl.datetimeformat.prototype.constructor","aoid":null,"title":"Intl.DateTimeFormat.prototype.constructor","titleHTML":"Intl.DateTimeFormat.prototype.constructor","number":"12.4.1","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Intl.DateTimeFormat.prototype.constructor"},{"type":"clause","id":"sec-intl.datetimeformat.prototype-@@tostringtag","aoid":null,"title":"Intl.DateTimeFormat.prototype [ @@toStringTag ]","titleHTML":"Intl.DateTimeFormat.prototype [ @@toStringTag ]","number":"12.4.2","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Intl.DateTimeFormat.prototype [ @@toStringTag ]"},{"type":"clause","id":"sec-intl.datetimeformat.prototype.format","aoid":null,"title":"get Intl.DateTimeFormat.prototype.format","titleHTML":"get Intl.DateTimeFormat.prototype.format","number":"12.4.3","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_65","_ref_104"],"key":"get Intl.DateTimeFormat.prototype.format"},{"type":"clause","id":"sec-Intl.DateTimeFormat.prototype.formatToParts","aoid":null,"title":"Intl.DateTimeFormat.prototype.formatToParts ( date )","titleHTML":"Intl.DateTimeFormat.prototype.formatToParts ( <var>date</var> )","number":"12.4.4","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Intl.DateTimeFormat.prototype.formatToParts ( date )"},{"type":"table","id":"table-datetimeformat-resolvedoptions-properties","number":6,"caption":"Table 6: Resolved Options of DateTimeFormat Instances","referencingIds":["_ref_62"],"namespace":"https://tc39.github.io/ecma402/","location":"","key":"Table 6: Resolved Options of DateTimeFormat Instances"},{"type":"clause","id":"sec-intl.datetimeformat.prototype.resolvedoptions","aoid":null,"title":"Intl.DateTimeFormat.prototype.resolvedOptions ()","titleHTML":"Intl.DateTimeFormat.prototype.resolvedOptions ()","number":"12.4.5","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Intl.DateTimeFormat.prototype.resolvedOptions ()"},{"type":"clause","id":"sec-properties-of-intl-datetimeformat-prototype-object","aoid":null,"title":"Properties of the Intl.DateTimeFormat Prototype Object","titleHTML":"Properties of the Intl.DateTimeFormat Prototype Object","number":"12.4","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_113","_ref_351","_ref_367"],"key":"Properties of the Intl.DateTimeFormat Prototype Object"},{"type":"clause","id":"sec-properties-of-intl-datetimeformat-instances","aoid":null,"title":"Properties of Intl.DateTimeFormat Instances","titleHTML":"Properties of Intl.DateTimeFormat Instances","number":"12.5","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Properties of Intl.DateTimeFormat Instances"},{"type":"clause","id":"datetimeformat-objects","aoid":null,"title":"DateTimeFormat Objects","titleHTML":"DateTimeFormat Objects","number":"12","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_22"],"key":"DateTimeFormat Objects"},{"type":"op","aoid":"InitializePluralRules","refId":"sec-initializepluralrules","location":"","referencingIds":[],"key":"InitializePluralRules"},{"type":"clause","id":"sec-initializepluralrules","aoid":"InitializePluralRules","title":"InitializePluralRules ( pluralRules, locales, options )","titleHTML":"InitializePluralRules ( <var>pluralRules</var>, <var>locales</var>, <var>options</var> )","number":"13.1.1","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_100","_ref_391"],"key":"InitializePluralRules ( pluralRules, locales, options )"},{"type":"table","id":"table-plural-operands","number":7,"caption":"Table 7: Plural Rules Operands Record Fields","referencingIds":[],"namespace":"https://tc39.github.io/ecma402/","location":"","key":"Table 7: Plural Rules Operands Record Fields"},{"type":"op","aoid":"GetOperands","refId":"sec-getoperands","location":"","referencingIds":[],"key":"GetOperands"},{"type":"clause","id":"sec-getoperands","aoid":"GetOperands","title":"GetOperands ( s )","titleHTML":"GetOperands ( <var>s</var> )","number":"13.1.2","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"GetOperands ( s )"},{"type":"op","aoid":"PluralRuleSelect","refId":"sec-pluralruleselect","location":"","referencingIds":[],"key":"PluralRuleSelect"},{"type":"clause","id":"sec-pluralruleselect","aoid":"PluralRuleSelect","title":"PluralRuleSelect ( locale, type, n, operands )","titleHTML":"PluralRuleSelect ( <var>locale</var>, <var>type</var>, <var>n</var>, <var>operands</var> )","number":"13.1.3","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_70","_ref_388"],"key":"PluralRuleSelect ( locale, type, n, operands )"},{"type":"op","aoid":"ResolvePlural","refId":"sec-resolveplural","location":"","referencingIds":[],"key":"ResolvePlural"},{"type":"clause","id":"sec-resolveplural","aoid":"ResolvePlural","title":"ResolvePlural ( pluralRules, n )","titleHTML":"ResolvePlural ( <var>pluralRules</var>, <var>n</var> )","number":"13.1.4","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_399"],"key":"ResolvePlural ( pluralRules, n )"},{"type":"clause","id":"sec-intl-pluralrules-abstracts","aoid":null,"title":"Abstract Operations for PluralRules Objects","titleHTML":"Abstract Operations for PluralRules Objects","number":"13.1","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Abstract Operations for PluralRules Objects"},{"type":"term","term":"%PluralRules%","refId":"sec-intl-pluralrules-constructor","referencingIds":[],"namespace":"https://tc39.github.io/ecma402/","location":"","key":"%PluralRules%"},{"type":"clause","id":"sec-intl.pluralrules","aoid":null,"title":"Intl.PluralRules ( [ locales [ , options ] ] )","titleHTML":"Intl.PluralRules ( [ <var>locales</var> [ , <var>options</var> ] ] )","number":"13.2.1","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Intl.PluralRules ( [ locales [ , options ] ] )"},{"type":"clause","id":"sec-intl-pluralrules-constructor","aoid":null,"title":"The Intl.PluralRules Constructor","titleHTML":"The Intl.PluralRules Constructor","number":"13.2","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_9","_ref_115","_ref_117","_ref_374","_ref_376","_ref_377","_ref_393","_ref_396"],"key":"The Intl.PluralRules Constructor"},{"type":"clause","id":"sec-intl.pluralrules.prototype","aoid":null,"title":"Intl.PluralRules.prototype","titleHTML":"Intl.PluralRules.prototype","number":"13.3.1","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_10"],"key":"Intl.PluralRules.prototype"},{"type":"clause","id":"sec-intl.pluralrules.supportedlocalesof","aoid":null,"title":"Intl.PluralRules.supportedLocalesOf ( locales [, options ] )","titleHTML":"Intl.PluralRules.supportedLocalesOf ( <var>locales</var> [, <var>options</var> ] )","number":"13.3.2","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Intl.PluralRules.supportedLocalesOf ( locales [, options ] )"},{"type":"clause","id":"sec-intl.pluralrules-internal-slots","aoid":null,"title":"Internal slots","titleHTML":"Internal slots","number":"13.3.3","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Internal slots"},{"type":"clause","id":"sec-properties-of-intl-pluralrules-constructor","aoid":null,"title":"Properties of the Intl.PluralRules Constructor","titleHTML":"Properties of the Intl.PluralRules Constructor","number":"13.3","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Properties of the Intl.PluralRules Constructor"},{"type":"term","term":"%PluralRulesPrototype%","refId":"sec-properties-of-intl-pluralrules-prototype-object","referencingIds":[],"namespace":"https://tc39.github.io/ecma402/","location":"","key":"%PluralRulesPrototype%"},{"type":"clause","id":"sec-intl.pluralrules.prototype.constructor","aoid":null,"title":"Intl.PluralRules.prototype.constructor","titleHTML":"Intl.PluralRules.prototype.constructor","number":"13.4.1","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Intl.PluralRules.prototype.constructor"},{"type":"clause","id":"sec-intl.pluralrules.prototype-tostringtag","aoid":null,"title":"Intl.PluralRules.prototype [ @@toStringTag ]","titleHTML":"Intl.PluralRules.prototype [ @@toStringTag ]","number":"13.4.2","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Intl.PluralRules.prototype [ @@toStringTag ]"},{"type":"clause","id":"sec-intl.pluralrules.prototype.select","aoid":null,"title":"Intl.PluralRules.prototype.select( value )","titleHTML":"Intl.PluralRules.prototype.select( <var>value</var> )","number":"13.4.3","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Intl.PluralRules.prototype.select( value )"},{"type":"table","id":"table-pluralrules-resolvedoptions-properties","number":8,"caption":"Table 8: Resolved Options of PluralRules Instances","referencingIds":["_ref_69"],"namespace":"https://tc39.github.io/ecma402/","location":"","key":"Table 8: Resolved Options of PluralRules Instances"},{"type":"clause","id":"sec-intl.pluralrules.prototype.resolvedoptions","aoid":null,"title":"Intl.PluralRules.prototype.resolvedOptions ()","titleHTML":"Intl.PluralRules.prototype.resolvedOptions ()","number":"13.4.4","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Intl.PluralRules.prototype.resolvedOptions ()"},{"type":"clause","id":"sec-properties-of-intl-pluralrules-prototype-object","aoid":null,"title":"Properties of the Intl.PluralRules Prototype Object","titleHTML":"Properties of the Intl.PluralRules Prototype Object","number":"13.4","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_116","_ref_390","_ref_392","_ref_405"],"key":"Properties of the Intl.PluralRules Prototype Object"},{"type":"clause","id":"sec-properties-of-intl-pluralrules-instances","aoid":null,"title":"Properties of Intl.PluralRules Instances","titleHTML":"Properties of Intl.PluralRules Instances","number":"13.5","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Properties of Intl.PluralRules Instances"},{"type":"clause","id":"pluralrules-objects","aoid":null,"title":"PluralRules Objects","titleHTML":"PluralRules Objects","number":"13","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_23"],"key":"PluralRules Objects"},{"type":"clause","id":"sup-String.prototype.localeCompare","aoid":null,"title":"String.prototype.localeCompare ( that [ , locales [ , options ] ] )","titleHTML":"String.prototype.localeCompare ( <var>that</var> [ , <var>locales</var> [ , <var>options</var> ] ] )","number":"14.1.1","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"String.prototype.localeCompare ( that [ , locales [ , options ] ] )"},{"type":"clause","id":"sup-string.prototype.tolocalelowercase","aoid":null,"title":"String.prototype.toLocaleLowerCase ( [ locales ] )","titleHTML":"String.prototype.toLocaleLowerCase ( [ <var>locales</var> ] )","number":"14.1.2","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"String.prototype.toLocaleLowerCase ( [ locales ] )"},{"type":"clause","id":"sup-string.prototype.tolocaleuppercase","aoid":null,"title":"String.prototype.toLocaleUpperCase ( [ locales ] )","titleHTML":"String.prototype.toLocaleUpperCase ( [ <var>locales</var> ] )","number":"14.1.3","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"String.prototype.toLocaleUpperCase ( [ locales ] )"},{"type":"clause","id":"sup-properties-of-the-string-prototype-object","aoid":null,"title":"Properties of the String Prototype Object","titleHTML":"Properties of the String Prototype Object","number":"14.1","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Properties of the String Prototype Object"},{"type":"clause","id":"sup-number.prototype.tolocalestring","aoid":null,"title":"Number.prototype.toLocaleString ( [ locales [ , options ] ] )","titleHTML":"Number.prototype.toLocaleString ( [ <var>locales</var> [ , <var>options</var> ] ] )","number":"14.2.1","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Number.prototype.toLocaleString ( [ locales [ , options ] ] )"},{"type":"clause","id":"sup-properties-of-the-number-prototype-object","aoid":null,"title":"Properties of the Number Prototype Object","titleHTML":"Properties of the Number Prototype Object","number":"14.2","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Properties of the Number Prototype Object"},{"type":"clause","id":"sup-date.prototype.tolocalestring","aoid":null,"title":"Date.prototype.toLocaleString ( [ locales [ , options ] ] )","titleHTML":"Date.prototype.toLocaleString ( [ <var>locales</var> [ , <var>options</var> ] ] )","number":"14.3.1","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Date.prototype.toLocaleString ( [ locales [ , options ] ] )"},{"type":"clause","id":"sup-date.prototype.tolocaledatestring","aoid":null,"title":"Date.prototype.toLocaleDateString ( [ locales [ , options ] ] )","titleHTML":"Date.prototype.toLocaleDateString ( [ <var>locales</var> [ , <var>options</var> ] ] )","number":"14.3.2","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Date.prototype.toLocaleDateString ( [ locales [ , options ] ] )"},{"type":"clause","id":"sup-date.prototype.tolocaletimestring","aoid":null,"title":"Date.prototype.toLocaleTimeString ( [ locales [ , options ] ] )","titleHTML":"Date.prototype.toLocaleTimeString ( [ <var>locales</var> [ , <var>options</var> ] ] )","number":"14.3.3","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Date.prototype.toLocaleTimeString ( [ locales [ , options ] ] )"},{"type":"clause","id":"sup-properties-of-the-date-prototype-object","aoid":null,"title":"Properties of the Date Prototype Object","titleHTML":"Properties of the Date Prototype Object","number":"14.3","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Properties of the Date Prototype Object"},{"type":"clause","id":"sup-array.prototype.tolocalestring","aoid":null,"title":"Array.prototype.toLocaleString ( [ locales [ , options ] ] )","titleHTML":"Array.prototype.toLocaleString ( [ <var>locales</var> [ , <var>options</var> ] ] )","number":"14.4.1","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Array.prototype.toLocaleString ( [ locales [ , options ] ] )"},{"type":"clause","id":"sup-properties-of-the-array-prototype-object","aoid":null,"title":"Properties of the Array Prototype Object","titleHTML":"Properties of the Array Prototype Object","number":"14.4","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Properties of the Array Prototype Object"},{"type":"clause","id":"locale-sensitive-functions","aoid":null,"title":"Locale Sensitive Functions of the ECMAScript Language Specification","titleHTML":"Locale Sensitive Functions of the ECMAScript Language Specification","number":"14","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Locale Sensitive Functions of the ECMAScript Language Specification"},{"type":"clause","id":"annex-implementation-dependent-behaviour","aoid":null,"title":"Implementation Dependent Behaviour","titleHTML":"Implementation Dependent Behaviour","number":"A","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Implementation Dependent Behaviour"},{"type":"clause","id":"annex-incompatibilities","aoid":null,"title":"Additions and Changes That Introduce Incompatibilities with Prior Editions","titleHTML":"Additions and Changes That Introduce Incompatibilities with Prior Editions","number":"B","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Additions and Changes That Introduce Incompatibilities with Prior Editions"},{"type":"clause","id":"sec-colophon","aoid":null,"title":"Colophon","titleHTML":"Colophon","number":"C","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":["_ref_0"],"key":"Colophon"},{"type":"clause","id":"sec-copyright-and-software-license","aoid":null,"title":"Copyright & Software License","titleHTML":"Copyright &amp; Software License","number":"D","namespace":"https://tc39.github.io/ecma402/","location":"","referencingIds":[],"key":"Copyright & Software License"}]</script></head><body><div id="menu-toggle">☰</div><div id="menu-spacer"></div><div id="menu"><div id="menu-search"><input type="text" id="menu-search-box" placeholder="Search..."><div id="menu-search-results" class="inactive"></div></div><div id="menu-pins"><div class="menu-pane-header">Pins</div><ul id="menu-pins-list"></ul></div><div class="menu-pane-header">Table of Contents</div><div id="menu-toc"><ol class="toc"><li><span class="item-toggle-none"></span><a href="#introduction" title="Introduction">Introduction</a></li><li><span class="item-toggle-none"></span><a href="#scope" title="Scope"><span class="secnum">1</span> Scope</a></li><li><span class="item-toggle-none"></span><a href="#conformance" title="Conformance"><span class="secnum">2</span> Conformance</a></li><li><span class="item-toggle-none"></span><a href="#normative-references" title="Normative References"><span class="secnum">3</span> Normative References</a></li><li><span class="item-toggle">◢</span><a href="#overview" title="Overview"><span class="secnum">4</span> Overview</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-internationalization-localization-globalization" title="Internationalization, Localization, and Globalization"><span class="secnum">4.1</span> Internationalization, Localization, and Globalization</a></li><li><span class="item-toggle-none"></span><a href="#sec-api-overview" title="API Overview"><span class="secnum">4.2</span> API Overview</a></li><li><span class="item-toggle">◢</span><a href="#sec-implementation-dependencies" title="Implementation Dependencies"><span class="secnum">4.3</span> Implementation Dependencies</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-compatibility" title="Compatibility across implementations"><span class="secnum">4.3.1</span> Compatibility across implementations</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#conventions" title="Notational Conventions"><span class="secnum">5</span> Notational Conventions</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-402-well-known-intrinsic-objects" title="Well-Known Intrinsic Objects"><span class="secnum">5.1</span> Well-Known Intrinsic Objects</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#locales-currencies-tz" title="Identification of Locales, Currencies, and Time Zones"><span class="secnum">6</span> Identification of Locales, Currencies, and Time Zones</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-case-sensitivity-and-case-mapping" title="Case Sensitivity and Case Mapping"><span class="secnum">6.1</span> Case Sensitivity and Case Mapping</a></li><li><span class="item-toggle">◢</span><a href="#sec-language-tags" title="Language Tags"><span class="secnum">6.2</span> Language Tags</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-unicode-locale-extension-sequences" title="Unicode Locale Extension Sequences"><span class="secnum">6.2.1</span> Unicode Locale Extension Sequences</a></li><li><span class="item-toggle-none"></span><a href="#sec-isstructurallyvalidlanguagetag" title="IsStructurallyValidLanguageTag ( locale )"><span class="secnum">6.2.2</span> IsStructurallyValidLanguageTag ( <var>locale</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-canonicalizelanguagetag" title="CanonicalizeLanguageTag ( locale )"><span class="secnum">6.2.3</span> CanonicalizeLanguageTag ( <var>locale</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-defaultlocale" title="DefaultLocale ()"><span class="secnum">6.2.4</span> DefaultLocale ()</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-currency-codes" title="Currency Codes"><span class="secnum">6.3</span> Currency Codes</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-iswellformedcurrencycode" title="IsWellFormedCurrencyCode ( currency )"><span class="secnum">6.3.1</span> IsWellFormedCurrencyCode ( <var>currency</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-time-zone-names" title="Time Zone Names"><span class="secnum">6.4</span> Time Zone Names</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-isvalidtimezonename" title="IsValidTimeZoneName ( timeZone )"><span class="secnum">6.4.1</span> IsValidTimeZoneName ( <var>timeZone</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-canonicalizetimezonename" title="CanonicalizeTimeZoneName"><span class="secnum">6.4.2</span> CanonicalizeTimeZoneName</a></li><li><span class="item-toggle-none"></span><a href="#sec-defaulttimezone" title="DefaultTimeZone ()"><span class="secnum">6.4.3</span> DefaultTimeZone ()</a></li></ol></li></ol></li><li><span class="item-toggle-none"></span><a href="#requirements" title="Requirements for Standard Built-in ECMAScript Objects"><span class="secnum">7</span> Requirements for Standard Built-in ECMAScript Objects</a></li><li><span class="item-toggle">◢</span><a href="#intl-object" title="The Intl Object"><span class="secnum">8</span> The Intl Object</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-constructor-properties-of-the-intl-object" title="Constructor Properties of the Intl Object"><span class="secnum">8.1</span> Constructor Properties of the Intl Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-intl.collator-intro" title="Intl.Collator (...)"><span class="secnum">8.1.1</span> Intl.Collator (...)</a></li><li><span class="item-toggle-none"></span><a href="#sec-intl.numberformat-intro" title="Intl.NumberFormat (...)"><span class="secnum">8.1.2</span> Intl.NumberFormat (...)</a></li><li><span class="item-toggle-none"></span><a href="#sec-intl.datetimeformat-intro" title="Intl.DateTimeFormat (...)"><span class="secnum">8.1.3</span> Intl.DateTimeFormat (...)</a></li><li><span class="item-toggle-none"></span><a href="#sec-intl.pluralrules-intro" title="Intl.PluralRules (...)"><span class="secnum">8.1.4</span> Intl.PluralRules (...)</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-function-properties-of-the-intl-object" title="Function Properties of the Intl Object"><span class="secnum">8.2</span> Function Properties of the Intl Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-intl.getcanonicallocales" title="Intl.getCanonicalLocales ( locales )"><span class="secnum">8.2.1</span> Intl.getCanonicalLocales ( <var>locales</var> )</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#locale-and-parameter-negotiation" title="Locale and Parameter Negotiation"><span class="secnum">9</span> Locale and Parameter Negotiation</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-internal-slots" title="Internal slots of Service Constructors"><span class="secnum">9.1</span> Internal slots of Service Constructors</a></li><li><span class="item-toggle">◢</span><a href="#sec-abstract-operations" title="Abstract Operations"><span class="secnum">9.2</span> Abstract Operations</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-canonicalizelocalelist" title="CanonicalizeLocaleList ( locales )"><span class="secnum">9.2.1</span> CanonicalizeLocaleList ( <var>locales</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-bestavailablelocale" title="BestAvailableLocale ( availableLocales, locale )"><span class="secnum">9.2.2</span> BestAvailableLocale ( <var>availableLocales</var>, <var>locale</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-lookupmatcher" title="LookupMatcher ( availableLocales, requestedLocales )"><span class="secnum">9.2.3</span> LookupMatcher ( <var>availableLocales</var>, <var>requestedLocales</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-bestfitmatcher" title="BestFitMatcher ( availableLocales, requestedLocales )"><span class="secnum">9.2.4</span> BestFitMatcher ( <var>availableLocales</var>, <var>requestedLocales</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-unicodeextensionvalue" title="UnicodeExtensionValue ( extension, key )"><span class="secnum">9.2.5</span> UnicodeExtensionValue ( <var>extension</var>, <var>key</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-resolvelocale" title="ResolveLocale ( availableLocales, requestedLocales, options, relevantExtensionKeys, localeData )"><span class="secnum">9.2.6</span> ResolveLocale ( <var>availableLocales</var>, <var>requestedLocales</var>, <var>options</var>, <var>relevantExtensionKeys</var>, <var>localeData</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-lookupsupportedlocales" title="LookupSupportedLocales ( availableLocales, requestedLocales )"><span class="secnum">9.2.7</span> LookupSupportedLocales ( <var>availableLocales</var>, <var>requestedLocales</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-bestfitsupportedlocales" title="BestFitSupportedLocales ( availableLocales, requestedLocales )"><span class="secnum">9.2.8</span> BestFitSupportedLocales ( <var>availableLocales</var>, <var>requestedLocales</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-supportedlocales" title="SupportedLocales ( availableLocales, requestedLocales, options )"><span class="secnum">9.2.9</span> SupportedLocales ( <var>availableLocales</var>, <var>requestedLocales</var>, <var>options</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-getoption" title="GetOption ( options, property, type, values, fallback )"><span class="secnum">9.2.10</span> GetOption ( <var>options</var>, <var>property</var>, <var>type</var>, <var>values</var>, <var>fallback</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-defaultnumberoption" title="DefaultNumberOption ( value, minimum, maximum, fallback )"><span class="secnum">9.2.11</span> DefaultNumberOption ( <var>value</var>, <var>minimum</var>, <var>maximum</var>, <var>fallback</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-getnumberoption" title="GetNumberOption ( options, property, minimum, maximum, fallback )"><span class="secnum">9.2.12</span> GetNumberOption ( <var>options</var>, <var>property</var>, <var>minimum</var>, <var>maximum</var>, <var>fallback</var> )</a></li></ol></li></ol></li><li><span class="item-toggle">◢</span><a href="#collator-objects" title="Collator Objects"><span class="secnum">10</span> Collator Objects</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-the-intl-collator-constructor" title="The Intl.Collator Constructor"><span class="secnum">10.1</span> The Intl.Collator Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-initializecollator" title="InitializeCollator ( collator, locales, options )"><span class="secnum">10.1.1</span> InitializeCollator ( <var>collator</var>, <var>locales</var>, <var>options</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-intl.collator" title="Intl.Collator ( [ locales [ , options ] ] )"><span class="secnum">10.1.2</span> Intl.Collator ( [ <var>locales</var> [ , <var>options</var> ] ] )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-intl-collator-constructor" title="Properties of the Intl.Collator Constructor"><span class="secnum">10.2</span> Properties of the Intl.Collator Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-intl.collator.prototype" title="Intl.Collator.prototype"><span class="secnum">10.2.1</span> Intl.Collator.prototype</a></li><li><span class="item-toggle-none"></span><a href="#sec-intl.collator.supportedlocalesof" title="Intl.Collator.supportedLocalesOf ( locales [ , options ] )"><span class="secnum">10.2.2</span> Intl.Collator.supportedLocalesOf ( <var>locales</var> [ , <var>options</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-intl-collator-internal-slots" title="Internal Slots"><span class="secnum">10.2.3</span> Internal Slots</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-intl-collator-prototype-object" title="Properties of the Intl.Collator Prototype Object"><span class="secnum">10.3</span> Properties of the Intl.Collator Prototype Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-intl.collator.prototype.constructor" title="Intl.Collator.prototype.constructor"><span class="secnum">10.3.1</span> Intl.Collator.prototype.constructor</a></li><li><span class="item-toggle-none"></span><a href="#sec-intl.collator.prototype-@@tostringtag" title="Intl.Collator.prototype [ @@toStringTag ]"><span class="secnum">10.3.2</span> Intl.Collator.prototype [ @@toStringTag ]</a></li><li><span class="item-toggle">◢</span><a href="#sec-intl.collator.prototype.compare" title="get Intl.Collator.prototype.compare"><span class="secnum">10.3.3</span> get Intl.Collator.prototype.compare</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-collator-compare-functions" title="Collator Compare Functions"><span class="secnum">10.3.3.1</span> Collator Compare Functions</a></li><li><span class="item-toggle-none"></span><a href="#sec-collator-comparestrings" title="CompareStrings ( collator, x, y )"><span class="secnum">10.3.3.2</span> CompareStrings ( <var>collator</var>, <var>x</var>, <var>y</var> )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-intl.collator.prototype.resolvedoptions" title="Intl.Collator.prototype.resolvedOptions ()"><span class="secnum">10.3.4</span> Intl.Collator.prototype.resolvedOptions ()</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-properties-of-intl-collator-instances" title="Properties of Intl.Collator Instances"><span class="secnum">10.4</span> Properties of Intl.Collator Instances</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#numberformat-objects" title="NumberFormat Objects"><span class="secnum">11</span> NumberFormat Objects</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-numberformat-abstracts" title="Abstract Operations For NumberFormat Objects"><span class="secnum">11.1</span> Abstract Operations For NumberFormat Objects</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-setnfdigitoptions" title="SetNumberFormatDigitOptions ( intlObj, options, mnfdDefault, mxfdDefault )"><span class="secnum">11.1.1</span> SetNumberFormatDigitOptions ( <var>intlObj</var>, <var>options</var>, <var>mnfdDefault</var>, <var>mxfdDefault</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-initializenumberformat" title="InitializeNumberFormat ( numberFormat, locales, options )"><span class="secnum">11.1.2</span> InitializeNumberFormat ( <var>numberFormat</var>, <var>locales</var>, <var>options</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-currencydigits" title="CurrencyDigits ( currency )"><span class="secnum">11.1.3</span> CurrencyDigits ( <var>currency</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-number-format-functions" title="Number Format Functions"><span class="secnum">11.1.4</span> Number Format Functions</a></li><li><span class="item-toggle-none"></span><a href="#sec-formatnumberstring" title="FormatNumberToString ( intlObject, x )"><span class="secnum">11.1.5</span> FormatNumberToString ( <var>intlObject</var>, <var>x</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-partitionnumberpattern" title="PartitionNumberPattern ( numberFormat, x )"><span class="secnum">11.1.6</span> PartitionNumberPattern ( <var>numberFormat</var>, <var>x</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-formatnumber" title="FormatNumber( numberFormat, x )"><span class="secnum">11.1.7</span> FormatNumber( <var>numberFormat</var>, <var>x</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-formatnumbertoparts" title="FormatNumberToParts( numberFormat, x )"><span class="secnum">11.1.8</span> FormatNumberToParts( <var>numberFormat</var>, <var>x</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-torawprecision" title="ToRawPrecision( x, minPrecision, maxPrecision )"><span class="secnum">11.1.9</span> ToRawPrecision( <var>x</var>, <var>minPrecision</var>, <var>maxPrecision</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-torawfixed" title="ToRawFixed( x, minInteger, minFraction, maxFraction )"><span class="secnum">11.1.10</span> ToRawFixed( <var>x</var>, <var>minInteger</var>, <var>minFraction</var>, <var>maxFraction</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-unwrapnumberformat" title="UnwrapNumberFormat( nf )"><span class="secnum">11.1.11</span> UnwrapNumberFormat( <var>nf</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-intl-numberformat-constructor" title="The Intl.NumberFormat Constructor"><span class="secnum">11.2</span> The Intl.NumberFormat Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-intl.numberformat" title="Intl.NumberFormat ( [ locales [ , options ] ] )"><span class="secnum">11.2.1</span> Intl.NumberFormat ( [ <var>locales</var> [ , <var>options</var> ] ] )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-intl-numberformat-constructor" title="Properties of the Intl.NumberFormat Constructor"><span class="secnum">11.3</span> Properties of the Intl.NumberFormat Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-intl.numberformat.prototype" title="Intl.NumberFormat.prototype"><span class="secnum">11.3.1</span> Intl.NumberFormat.prototype</a></li><li><span class="item-toggle-none"></span><a href="#sec-intl.numberformat.supportedlocalesof" title="Intl.NumberFormat.supportedLocalesOf ( locales [ , options ] )"><span class="secnum">11.3.2</span> Intl.NumberFormat.supportedLocalesOf ( <var>locales</var> [ , <var>options</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-intl.numberformat-internal-slots" title="Internal slots"><span class="secnum">11.3.3</span> Internal slots</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-intl-numberformat-prototype-object" title="Properties of the Intl.NumberFormat Prototype Object"><span class="secnum">11.4</span> Properties of the Intl.NumberFormat Prototype Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-intl.numberformat.prototype.constructor" title="Intl.NumberFormat.prototype.constructor"><span class="secnum">11.4.1</span> Intl.NumberFormat.prototype.constructor</a></li><li><span class="item-toggle-none"></span><a href="#sec-intl.numberformat.prototype-@@tostringtag" title="Intl.NumberFormat.prototype [ @@toStringTag ]"><span class="secnum">11.4.2</span> Intl.NumberFormat.prototype [ @@toStringTag ]</a></li><li><span class="item-toggle-none"></span><a href="#sec-intl.numberformat.prototype.format" title="get Intl.NumberFormat.prototype.format"><span class="secnum">11.4.3</span> get Intl.NumberFormat.prototype.format</a></li><li><span class="item-toggle-none"></span><a href="#sec-intl.numberformat.prototype.formattoparts" title="Intl.NumberFormat.prototype.formatToParts ( value )"><span class="secnum">11.4.4</span> Intl.NumberFormat.prototype.formatToParts ( <var>value</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-intl.numberformat.prototype.resolvedoptions" title="Intl.NumberFormat.prototype.resolvedOptions ()"><span class="secnum">11.4.5</span> Intl.NumberFormat.prototype.resolvedOptions ()</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-properties-of-intl-numberformat-instances" title="Properties of Intl.NumberFormat Instances"><span class="secnum">11.5</span> Properties of Intl.NumberFormat Instances</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#datetimeformat-objects" title="DateTimeFormat Objects"><span class="secnum">12</span> DateTimeFormat Objects</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-datetimeformat-abstracts" title="Abstract Operations For DateTimeFormat Objects"><span class="secnum">12.1</span> Abstract Operations For DateTimeFormat Objects</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-initializedatetimeformat" title="InitializeDateTimeFormat ( dateTimeFormat, locales, options )"><span class="secnum">12.1.1</span> InitializeDateTimeFormat ( <var>dateTimeFormat</var>, <var>locales</var>, <var>options</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-todatetimeoptions" title="ToDateTimeOptions ( options, required, defaults )"><span class="secnum">12.1.2</span> ToDateTimeOptions ( <var>options</var>, <var>required</var>, <var>defaults</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-basicformatmatcher" title="BasicFormatMatcher ( options, formats )"><span class="secnum">12.1.3</span> BasicFormatMatcher ( <var>options</var>, <var>formats</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-bestfitformatmatcher" title="BestFitFormatMatcher ( options, formats )"><span class="secnum">12.1.4</span> BestFitFormatMatcher ( <var>options</var>, <var>formats</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-datetime-format-functions" title="DateTime Format Functions"><span class="secnum">12.1.5</span> DateTime Format Functions</a></li><li><span class="item-toggle-none"></span><a href="#sec-partitiondatetimepattern" title="PartitionDateTimePattern ( dateTimeFormat, x )"><span class="secnum">12.1.6</span> PartitionDateTimePattern ( <var>dateTimeFormat</var>, <var>x</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-formatdatetime" title="FormatDateTime( dateTimeFormat, x )"><span class="secnum">12.1.7</span> FormatDateTime( <var>dateTimeFormat</var>, <var>x</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-formatdatetimetoparts" title="FormatDateTimeToParts ( dateTimeFormat, x )"><span class="secnum">12.1.8</span> FormatDateTimeToParts ( <var>dateTimeFormat</var>, <var>x</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-tolocaltime" title="ToLocalTime ( date, calendar, timeZone )"><span class="secnum">12.1.9</span> ToLocalTime ( <var>date</var>, <var>calendar</var>, <var>timeZone</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-unwrapdatetimeformat" title="UnwrapDateTimeFormat( dtf )"><span class="secnum">12.1.10</span> UnwrapDateTimeFormat( <var>dtf</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-intl-datetimeformat-constructor" title="The Intl.DateTimeFormat Constructor"><span class="secnum">12.2</span> The Intl.DateTimeFormat Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-intl.datetimeformat" title="Intl.DateTimeFormat ( [ locales [ , options ] ] )"><span class="secnum">12.2.1</span> Intl.DateTimeFormat ( [ <var>locales</var> [ , <var>options</var> ] ] )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-intl-datetimeformat-constructor" title="Properties of the Intl.DateTimeFormat Constructor"><span class="secnum">12.3</span> Properties of the Intl.DateTimeFormat Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-intl.datetimeformat.prototype" title="Intl.DateTimeFormat.prototype"><span class="secnum">12.3.1</span> Intl.DateTimeFormat.prototype</a></li><li><span class="item-toggle-none"></span><a href="#sec-intl.datetimeformat.supportedlocalesof" title="Intl.DateTimeFormat.supportedLocalesOf ( locales [ , options ] )"><span class="secnum">12.3.2</span> Intl.DateTimeFormat.supportedLocalesOf ( <var>locales</var> [ , <var>options</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-intl.datetimeformat-internal-slots" title="Internal slots"><span class="secnum">12.3.3</span> Internal slots</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-intl-datetimeformat-prototype-object" title="Properties of the Intl.DateTimeFormat Prototype Object"><span class="secnum">12.4</span> Properties of the Intl.DateTimeFormat Prototype Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-intl.datetimeformat.prototype.constructor" title="Intl.DateTimeFormat.prototype.constructor"><span class="secnum">12.4.1</span> Intl.DateTimeFormat.prototype.constructor</a></li><li><span class="item-toggle-none"></span><a href="#sec-intl.datetimeformat.prototype-@@tostringtag" title="Intl.DateTimeFormat.prototype [ @@toStringTag ]"><span class="secnum">12.4.2</span> Intl.DateTimeFormat.prototype [ @@toStringTag ]</a></li><li><span class="item-toggle-none"></span><a href="#sec-intl.datetimeformat.prototype.format" title="get Intl.DateTimeFormat.prototype.format"><span class="secnum">12.4.3</span> get Intl.DateTimeFormat.prototype.format</a></li><li><span class="item-toggle-none"></span><a href="#sec-Intl.DateTimeFormat.prototype.formatToParts" title="Intl.DateTimeFormat.prototype.formatToParts ( date )"><span class="secnum">12.4.4</span> Intl.DateTimeFormat.prototype.formatToParts ( <var>date</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-intl.datetimeformat.prototype.resolvedoptions" title="Intl.DateTimeFormat.prototype.resolvedOptions ()"><span class="secnum">12.4.5</span> Intl.DateTimeFormat.prototype.resolvedOptions ()</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-properties-of-intl-datetimeformat-instances" title="Properties of Intl.DateTimeFormat Instances"><span class="secnum">12.5</span> Properties of Intl.DateTimeFormat Instances</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#pluralrules-objects" title="PluralRules Objects"><span class="secnum">13</span> PluralRules Objects</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-intl-pluralrules-abstracts" title="Abstract Operations for PluralRules Objects"><span class="secnum">13.1</span> Abstract Operations for PluralRules Objects</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-initializepluralrules" title="InitializePluralRules ( pluralRules, locales, options )"><span class="secnum">13.1.1</span> InitializePluralRules ( <var>pluralRules</var>, <var>locales</var>, <var>options</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-getoperands" title="GetOperands ( s )"><span class="secnum">13.1.2</span> GetOperands ( <var>s</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-pluralruleselect" title="PluralRuleSelect ( locale, type, n, operands )"><span class="secnum">13.1.3</span> PluralRuleSelect ( <var>locale</var>, <var>type</var>, <var>n</var>, <var>operands</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-resolveplural" title="ResolvePlural ( pluralRules, n )"><span class="secnum">13.1.4</span> ResolvePlural ( <var>pluralRules</var>, <var>n</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-intl-pluralrules-constructor" title="The Intl.PluralRules Constructor"><span class="secnum">13.2</span> The Intl.PluralRules Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-intl.pluralrules" title="Intl.PluralRules ( [ locales [ , options ] ] )"><span class="secnum">13.2.1</span> Intl.PluralRules ( [ <var>locales</var> [ , <var>options</var> ] ] )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-intl-pluralrules-constructor" title="Properties of the Intl.PluralRules Constructor"><span class="secnum">13.3</span> Properties of the Intl.PluralRules Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-intl.pluralrules.prototype" title="Intl.PluralRules.prototype"><span class="secnum">13.3.1</span> Intl.PluralRules.prototype</a></li><li><span class="item-toggle-none"></span><a href="#sec-intl.pluralrules.supportedlocalesof" title="Intl.PluralRules.supportedLocalesOf ( locales [, options ] )"><span class="secnum">13.3.2</span> Intl.PluralRules.supportedLocalesOf ( <var>locales</var> [, <var>options</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-intl.pluralrules-internal-slots" title="Internal slots"><span class="secnum">13.3.3</span> Internal slots</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-intl-pluralrules-prototype-object" title="Properties of the Intl.PluralRules Prototype Object"><span class="secnum">13.4</span> Properties of the Intl.PluralRules Prototype Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-intl.pluralrules.prototype.constructor" title="Intl.PluralRules.prototype.constructor"><span class="secnum">13.4.1</span> Intl.PluralRules.prototype.constructor</a></li><li><span class="item-toggle-none"></span><a href="#sec-intl.pluralrules.prototype-tostringtag" title="Intl.PluralRules.prototype [ @@toStringTag ]"><span class="secnum">13.4.2</span> Intl.PluralRules.prototype [ @@toStringTag ]</a></li><li><span class="item-toggle-none"></span><a href="#sec-intl.pluralrules.prototype.select" title="Intl.PluralRules.prototype.select( value )"><span class="secnum">13.4.3</span> Intl.PluralRules.prototype.select( <var>value</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-intl.pluralrules.prototype.resolvedoptions" title="Intl.PluralRules.prototype.resolvedOptions ()"><span class="secnum">13.4.4</span> Intl.PluralRules.prototype.resolvedOptions ()</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-properties-of-intl-pluralrules-instances" title="Properties of Intl.PluralRules Instances"><span class="secnum">13.5</span> Properties of Intl.PluralRules Instances</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#locale-sensitive-functions" title="Locale Sensitive Functions of the ECMAScript Language Specification"><span class="secnum">14</span> Locale Sensitive Functions of the ECMAScript Language Specification</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sup-properties-of-the-string-prototype-object" title="Properties of the String Prototype Object"><span class="secnum">14.1</span> Properties of the String Prototype Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sup-String.prototype.localeCompare" title="String.prototype.localeCompare ( that [ , locales [ , options ] ] )"><span class="secnum">14.1.1</span> String.prototype.localeCompare ( <var>that</var> [ , <var>locales</var> [ , <var>options</var> ] ] )</a></li><li><span class="item-toggle-none"></span><a href="#sup-string.prototype.tolocalelowercase" title="String.prototype.toLocaleLowerCase ( [ locales ] )"><span class="secnum">14.1.2</span> String.prototype.toLocaleLowerCase ( [ <var>locales</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sup-string.prototype.tolocaleuppercase" title="String.prototype.toLocaleUpperCase ( [ locales ] )"><span class="secnum">14.1.3</span> String.prototype.toLocaleUpperCase ( [ <var>locales</var> ] )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sup-properties-of-the-number-prototype-object" title="Properties of the Number Prototype Object"><span class="secnum">14.2</span> Properties of the Number Prototype Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sup-number.prototype.tolocalestring" title="Number.prototype.toLocaleString ( [ locales [ , options ] ] )"><span class="secnum">14.2.1</span> Number.prototype.toLocaleString ( [ <var>locales</var> [ , <var>options</var> ] ] )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sup-properties-of-the-date-prototype-object" title="Properties of the Date Prototype Object"><span class="secnum">14.3</span> Properties of the Date Prototype Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sup-date.prototype.tolocalestring" title="Date.prototype.toLocaleString ( [ locales [ , options ] ] )"><span class="secnum">14.3.1</span> Date.prototype.toLocaleString ( [ <var>locales</var> [ , <var>options</var> ] ] )</a></li><li><span class="item-toggle-none"></span><a href="#sup-date.prototype.tolocaledatestring" title="Date.prototype.toLocaleDateString ( [ locales [ , options ] ] )"><span class="secnum">14.3.2</span> Date.prototype.toLocaleDateString ( [ <var>locales</var> [ , <var>options</var> ] ] )</a></li><li><span class="item-toggle-none"></span><a href="#sup-date.prototype.tolocaletimestring" title="Date.prototype.toLocaleTimeString ( [ locales [ , options ] ] )"><span class="secnum">14.3.3</span> Date.prototype.toLocaleTimeString ( [ <var>locales</var> [ , <var>options</var> ] ] )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sup-properties-of-the-array-prototype-object" title="Properties of the Array Prototype Object"><span class="secnum">14.4</span> Properties of the Array Prototype Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sup-array.prototype.tolocalestring" title="Array.prototype.toLocaleString ( [ locales [ , options ] ] )"><span class="secnum">14.4.1</span> Array.prototype.toLocaleString ( [ <var>locales</var> [ , <var>options</var> ] ] )</a></li></ol></li></ol></li><li><span class="item-toggle-none"></span><a href="#annex-implementation-dependent-behaviour" title="Implementation Dependent Behaviour"><span class="secnum">A</span> Implementation Dependent Behaviour</a></li><li><span class="item-toggle-none"></span><a href="#annex-incompatibilities" title="Additions and Changes That Introduce Incompatibilities with Prior Editions"><span class="secnum">B</span> Additions and Changes That Introduce Incompatibilities with Prior Editions</a></li><li><span class="item-toggle-none"></span><a href="#sec-colophon" title="Colophon"><span class="secnum">C</span> Colophon</a></li><li><span class="item-toggle-none"></span><a href="#sec-copyright-and-software-license" title="Copyright &amp; Software License"><span class="secnum">D</span> Copyright &amp; Software License</a></li></ol></div></div><div id="spec-container"><h1 class="version first">Draft ECMA-402 / October 29, 2018</h1><h1 class="title">ECMAScript® 2019 Internationalization API Specification</h1>
<p><img src="img/ecma-logo.svg" id="ecma-logo"></p>
<emu-import href="./metablock.html"><div id="metadata-block">
  <h1>Contributing to this Specification</h1>
  <p>This specification is developed on GitHub with the help of the ECMAScript community. There are a number of ways to contribute to the development of this specification:</p>
  <ul>
    <li>GitHub Repository:  <a href="https://github.com/tc39/ecma402">https://github.com/tc39/ecma402</a></li>
    <li>Issues:  <a href="https://github.com/tc39/ecma402/issues">All Issues</a>,  <a href="https://github.com/tc39/ecma402/issues/new">File a New Issue</a></li>
    <li>Pull Requests:  <a href="https://github.com/tc39/ecma402/pulls">All Pull Requests</a>,  <a href="https://github.com/tc39/ecma402/pulls/new">Create a New Pull Request</a></li>
    <li>Test Suite:  <a href="https://github.com/tc39/test262">Test262</a></li>
    <li>Editor: Caridy Patiño (<a href="mailto:caridy at gmail dot com">E-mail</a>,  <a href="https://twitter.com/caridy">Twitter</a>,  <a href="https://github.com/caridy">GitHub</a>)</li>
    <li>
      Community:

      <ul>
        <li>Mailing list:  <a href="https://esdiscuss.org">es-discuss</a></li>
        <li>IRC:  <a href="ircs://irc.freenode.net:6667">#tc39</a> on  <a href="https://freenode.net/kb/answer/chat">freenode</a></li>
      </ul>
    </li>
  </ul>
  <p>Refer to the  <emu-xref href="#sec-colophon" id="_ref_0"><a href="#sec-colophon">colophon</a></emu-xref> for more information on how this document is created.</p>
</div>
</emu-import>
<emu-import href="./introduction.html"><emu-intro id="introduction">
  <h1>Introduction</h1>
  <p>
    This specification's source can be found at  <a href="https://github.com/tc39/ecma402">https://github.com/tc39/ecma402</a>.

  </p>
  <p>
    The ECMAScript 2019 Internationalization API Specification (ECMA-402 6<sup>th</sup> Edition), provides key language sensitive functionality as a complement to the ECMAScript 2019 Language Specification (ECMA-262 10<sup>th</sup> Edition or successor). Its functionality has been selected from that of well-established internationalization APIs such as those of the Internationalization Components for Unicode (ICU) library, of the .NET framework, or of the Java platform.

  </p>
  <p>
    The 1<sup>st</sup> Edition API was developed by an ad-hoc group established by Ecma TC39 in September 2010 based on a proposal by Nebojša Ćirić and Jungshik Shin.

  </p>
  <p>
    The 2<sup>nd</sup> Edition API was adopted by the General Assembly of June 2015, as a complement to the ECMAScript 6th Edition.

  </p>
  <p>
    The 3<sup>rd</sup> Edition API was the first edition released under Ecma TC39's new yearly release cadence and open development process. A plain-text source document was built from the ECMA-402 source document to serve as the base for further development entirely on GitHub. Over the year of this standard's development, dozens of pull requests and issues were filed representing several of bug fixes, editorial fixes and other improvements. Additionally, numerous software tools were developed to aid in this effort including Ecmarkup, Ecmarkdown, and Grammarkdown.

  </p>
  <p>
    Dozens of individuals representing many organizations have made very significant contributions within Ecma TC39 to the development of this edition and to the prior editions. In addition, a vibrant community has emerged supporting TC39's ECMAScript efforts. This community has reviewed numerous drafts, filed dozens of bug reports, performed implementation experiments, contributed test suites, and educated the world-wide developer community about ECMAScript Internationalization. Unfortunately, it is impossible to identify and acknowledge every person and organization who has contributed to this effort.

  </p>
  <p>
    Norbert Lindenberg<br>
    ECMA-402, 1<sup>st</sup> Edition Project Editor

  </p>
  <p>
    Rick Waldron<br>
    ECMA-402, 2<sup>nd</sup> Edition Project Editor

  </p>
  <p>
    Caridy Patiño<br>
    ECMA-402, 3<sup>rd</sup>, 4<sup>th</sup> and 5<sup>th</sup> Editions Project Editor

  </p>
</emu-intro>
</emu-import>
<emu-import href="./scope.html"><emu-clause id="scope">
  <h1><span class="secnum">1</span>Scope</h1>
  <p>
    This Standard defines the application programming interface for ECMAScript objects that support programs that need to adapt to the linguistic and cultural conventions used by different human languages and countries.

  </p>

</emu-clause>
</emu-import>
<emu-import href="./conformance.html"><emu-clause id="conformance">
  <h1><span class="secnum">2</span>Conformance</h1>
  <p>
    A conforming implementation of the ECMAScript 2019 Internationalization API Specification must conform to the ECMAScript 2019 Language Specification (ECMA-262 10<sup>th</sup> Edition, or successor), and must provide and support all the objects, properties, functions, and program semantics described in this specification.

  </p>
  <p>
    A conforming implementation of the ECMAScript 2019 Internationalization API Specification is permitted to provide additional objects, properties, and functions beyond those described in this specification. In particular, a conforming implementation of the ECMAScript 2019 Internationalization API Specification is permitted to provide properties not described in this specification, and values for those properties, for objects that are described in this specification. A conforming implementation is not permitted to add optional arguments to the functions defined in this specification.

  </p>
  <p>
    A conforming implementation is permitted to accept additional values, and then have implementation-defined behaviour instead of throwing a <emu-val>RangeError</emu-val>, for the following properties of <var>options</var>  arguments:

  </p>
  <p>
    </p><ul>
      <li>The <var>options</var> property localeMatcher in all constructors and supportedLocalesOf methods.</li>
      <li>The <var>options</var> properties usage and sensitivity in the Collator constructor.</li>
      <li>The <var>options</var> properties style and currencyDisplay in the NumberFormat constructor.</li>
      <li>The <var>options</var> properties minimumIntegerDigits, minimumFractionDigits, maximumFractionDigits, minimumSignificantDigits, and maximumSignificantDigits in the NumberFormat constructor, provided that the additional values are interpreted as integer values higher than the specified limits.</li>
      <li>The <var>options</var> properties listed in  <emu-xref href="#table-datetimeformat-components" id="_ref_1"><a href="#table-datetimeformat-components">Table 5</a></emu-xref> in the DateTimeFormat constructor.</li>
      <li>The <var>options</var> property formatMatcher in the DateTimeFormat constructor.</li>
      <li>The <var>options</var> property type in the PluralRules constructor.</li>
    </ul>
  <p></p>
</emu-clause>
</emu-import>
<emu-import href="./normative-references.html"><emu-clause id="normative-references">
  <h1><span class="secnum">3</span>Normative References</h1>
  <p>
    The following referenced documents are required for the application of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.

  </p>

  <p>
    ECMAScript 2019 Language Specification (ECMA-262 10<sup>th</sup> Edition, or successor).<br>
    <a href="https://www.ecma-international.org/publications/standards/Ecma-262.htm">https://www.ecma-international.org/publications/standards/Ecma-262.htm</a>
  </p>

  <emu-note><span class="note">Note</span><div class="note-contents">
    Throughout this document, the phrase “ES2019, <var>x</var>” (where x is a sequence of numbers separated by periods) may be used as shorthand for "ECMAScript 2019 Language Specification (ECMA-262 10<sup>th</sup> Edition, sub clause <var>x</var>)".

  </div></emu-note>

  <ul>
    <li>
      ISO/IEC 10646:2014: Information Technology – Universal Multiple-Octet Coded Character Set (UCS) plus Amendment 1:2015 and Amendment 2, plus additional amendments and corrigenda, or successor

      <ul>
        <li><a href="https://www.iso.org/iso/catalogue_detail.htm?csnumber=63182">https://www.iso.org/iso/catalogue_detail.htm?csnumber=63182</a></li>
        <li><a href="https://www.iso.org/iso/catalogue_detail.htm?csnumber=65047">https://www.iso.org/iso/catalogue_detail.htm?csnumber=65047</a></li>
        <li><a href="https://www.iso.org/iso/catalogue_detail.htm?csnumber=66791">https://www.iso.org/iso/catalogue_detail.htm?csnumber=66791</a></li>
      </ul>
    </li>
    <li>
      <a href="https://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=64758">ISO 4217:2015, Codes for the representation of currencies and funds, or successor</a>
    </li>
    <li>
      IETF BCP 47:

      <ul>
        <li>
          <a href="https://tools.ietf.org/html/rfc5646">RFC 5646, Tags for Identifying Languages, or successor</a>
        </li>
        <li>
          <a href="https://tools.ietf.org/html/rfc4647">RFC 4647, Matching of Language Tags, or successor</a>
        </li>
      </ul>
    </li>
    <li>
      <a href="https://tools.ietf.org/html/rfc6067">IETF RFC 6067, BCP 47 Extension U, or successor</a>
    </li>
    <li>
      <a href="https://www.iana.org/time-zones/">IANA Time Zone Database</a>
    </li>
    <li>
      <a href="https://www.unicode.org/versions/latest">The Unicode Standard</a>
    </li>
    <li>
      <a href="https://www.unicode.org/reports/tr35/">Unicode Technical Standard 35, Unicode Locale Data Markup Language</a>
    </li>
  </ul>

</emu-clause>
</emu-import>
<emu-import href="./overview.html"><emu-clause id="overview">
  <h1><span class="secnum">4</span>Overview</h1>

  <p>
    This section contains a non-normative overview of the ECMAScript 2019 Internationalization API Specification.

  </p>

  <emu-clause id="sec-internationalization-localization-globalization">
    <h1><span class="secnum">4.1</span>Internationalization, Localization, and Globalization</h1>

    <p>
      Internationalization of software means designing it such that it supports or can be easily adapted to support the needs of users speaking different languages and having different cultural expectations, and enables worldwide communication between them. Localization then is the actual adaptation to a specific language and culture. Globalization of software is commonly understood to be the combination of internationalization and localization. Globalization starts at the lowest level by using a text representation that supports all languages in the world, and using standard identifiers to identify languages, countries, time zones, and other relevant parameters. It continues with using a user interface language and data presentation that the user understands, and finally often requires product-specific adaptations to the user's language, culture, and environment.

    </p>
    <p>
      The ECMAScript 2019 Language Specification lays the foundation by using Unicode for text representation and by providing a few language-sensitive functions, but gives applications little control over the behaviour of these functions. The ECMAScript 2019 Internationalization API Specification builds on this by providing a set of customizable language-sensitive functionality. The API is useful even for applications that themselves are not internationalized, as even applications targeting only one language and one region need to properly support that one language and region. However, the API also enables applications that support multiple languages and regions, even concurrently, as may be needed in server environments.

    </p>
  </emu-clause>


  <emu-clause id="sec-api-overview">
    <h1><span class="secnum">4.2</span>API Overview</h1>

    <p>
      The ECMAScript 2019 Internationalization API Specification is designed to complement the ECMAScript 2019 Language Specification by providing key language-sensitive functionality. The API can be added to an implementation of the ECMAScript 2019 Language Specification (ECMA-262 10<sup>th</sup> Edition, or successor).

    </p>
    <p>
      The ECMAScript 2019 Internationalization API Specification provides several key pieces of language-sensitive functionality that are required in most applications: String comparison (collation), number formatting, date and time formatting, pluralization rules, and case conversion. While the ECMAScript 2019 Language Specification provides functions for this basic functionality (on Array.prototype: toLocaleString; on String.prototype: localeCompare, toLocaleLowerCase, toLocaleUpperCase; on Number.prototype: toLocaleString; on Date.prototype: toLocaleString, toLocaleDateString, and toLocaleTimeString), it leaves the actual behaviour of these functions largely up to implementations to define. The ECMAScript 2019 Internationalization API Specification provides additional functionality, control over the language and over details of the behaviour to be used, and a more complete specification of required functionality.

    </p>

    <p>
      Applications can use the API in two ways:

      </p><ol>
        <li>
          Directly, by using the constructors Intl.Collator, Intl.NumberFormat, Intl.DateTimeFormat, or Intl.PluralRules to construct an object, specifying a list of preferred languages and options to configure the behaviour of the resulting object. The object then provides a main function (compare, select, or format), which can be called repeatedly. It also provides a resolvedOptions function, which the application can use to find out the exact configuration of the object.

        </li>
        <li>
          Indirectly, by using the functions of the ECMAScript 2019 Language Specification mentioned above. The collation and formatting functions are respecified in this specification to accept the same arguments as the Collator, NumberFormat, and DateTimeFormat constructors and produce the same results as their compare or format methods. The case conversion functions are respecified to accept a list of preferred languages.

        </li>
      </ol>
    <p></p>

    <p>
      The Intl object is used to package all functionality defined in the ECMAScript 2019 Internationalization API Specification to avoid name collisions.

    </p>
  </emu-clause>

  <emu-clause id="sec-implementation-dependencies">
    <h1><span class="secnum">4.3</span>Implementation Dependencies</h1>

    <p>
      Due to the nature of internationalization, the API specification has to leave several details implementation dependent:

      </p><ul>
        <li>
          <em>The set of locales that an implementation supports with adequate localizations:</em> Linguists estimate the number of human languages to around 6000, and the more widely spoken ones have variations based on regions or other parameters. Even large locale data collections, such as the Common Locale Data Repository, cover only a subset of this large set. Implementations targeting resource-constrained devices may have to further reduce the subset.

        </li>
        <li>
          <em>The exact form of localizations such as format patterns:</em> In many cases locale-dependent conventions are not standardized, so different forms may exist side by side, or they vary over time. Different internationalization libraries may have implemented different forms, without any of them being actually wrong. In order to allow this API to be implemented on top of existing libraries, such variations have to be permitted.

        </li>
        <li>
          <em>Subsets of Unicode:</em> Some operations, such as collation, operate on strings that can include characters from the entire Unicode character set. However, both the Unicode standard and the ECMAScript standard allow implementations to limit their functionality to subsets of the Unicode character set. In addition, locale conventions typically don't specify the desired behaviour for the entire Unicode character set, but only for those characters that are relevant for the locale. While the Unicode Collation Algorithm combines a default collation order for the entire Unicode character set with the ability to tailor for local conventions, subsets and tailorings still result in differences in behaviour.

        </li>
      </ul>
    <p></p>

    <emu-clause id="sec-compatibility">
      <h1><span class="secnum">4.3.1</span>Compatibility across implementations</h1>

      <p>
        ECMA 402 describes the schema of the data used by its functions. The
        data contained inside is implementation-dependent, and expected to
        change over time and vary between implementations. The variation is
        visible by programmers, and it is possible to construct programs which
        will depend on a particular output. However, this specification
        attempts to describe reasonable constraints which will allow
        well-written programs to function across implementations.
        Implementations are encouraged to continue their efforts to harmonize
        linguistic data.

      </p>
    </emu-clause>
  </emu-clause>

</emu-clause>
</emu-import>
<emu-import href="./conventions.html"><emu-clause id="conventions">
  <h1><span class="secnum">5</span>Notational Conventions</h1>

  <p>
    This standard uses a subset of the notational conventions of the ECMAScript 2019 Language Specification (ECMA-262 10<sup>th</sup> Edition), as ES2019:

  </p>

  <ul>
    <li>Object Internal Methods and Internal Slots, as described in ES2019,  <emu-xref href="#sec-object-internal-methods-and-internal-slots"><a href="https://tc39.github.io/ecma262/#sec-object-internal-methods-and-internal-slots">6.1.7.2</a></emu-xref>.</li>
    <li>Algorithm conventions, including the use of abstract operations, as described in ES2019,  <emu-xref href="#sec-type-conversion"><a href="https://tc39.github.io/ecma262/#sec-type-conversion">7.1</a></emu-xref>,  <emu-xref href="#sec-testing-and-comparison-operations"><a href="https://tc39.github.io/ecma262/#sec-testing-and-comparison-operations">7.2</a></emu-xref>,  <emu-xref href="#sec-operations-on-objects"><a href="https://tc39.github.io/ecma262/#sec-operations-on-objects">7.3</a></emu-xref>.</li>
    <li>Internal Slots, as described in ES2019,  <emu-xref href="#sec-ordinary-object-internal-methods-and-internal-slots"><a href="https://tc39.github.io/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots">9.1</a></emu-xref>.</li>
    <li>The <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">List</a></emu-xref> and <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref> Specification Type, as described in ES2019,  <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">6.2.1</a></emu-xref>.</li>
  </ul>

  <emu-note><span class="note">Note</span><div class="note-contents">
    As described in the ECMAScript Language Specification, algorithms are used to precisely specify the required semantics of ECMAScript constructs, but are not intended to imply the use of any specific implementation technique. Internal slots are used to define the semantics of object values, but are not part of the API. They are defined purely for expository purposes. An implementation of the API must behave as if it produced and operated upon internal slots in the manner described here.

  </div></emu-note>

  <p>
    As an extension to the <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref> Specification Type, the notation “[[&lt;<var>name</var>&gt;]]” denotes a field whose name is given by the variable <var>name</var>, which must have a String value. For example, if a variable <var>s</var> has the value <code>"a"</code>, then [[&lt;<var>s</var>&gt;]] denotes the field [[a]].

  </p>

  <p>
    This specification uses blocks demarcated as  <span class="normative-optional">Normative Optional</span> to denote the sense of  <a href="https://tc39.github.io/ecma262/#sec-additional-ecmascript-features-for-web-browsers">Annex B</a> in ECMA 262. That is, normative optional sections are required when the ECMAScript host is a web browser. The content of the section is normative but optional if the ECMAScript host is not a web browser.

  </p>

  <emu-clause id="sec-402-well-known-intrinsic-objects">
    <h1><span class="secnum">5.1</span>Well-Known Intrinsic Objects</h1>

    <p>
      The following table extends the Well-Known Intrinsic Objects table defined in ES2019,  <emu-xref href="#sec-well-known-intrinsic-objects"><a href="https://tc39.github.io/ecma262/#sec-well-known-intrinsic-objects">6.1.7.4</a></emu-xref>.

    </p>

    <emu-table id="table-402-well-known-intrinsic-objects"><figure><figcaption>Table 1: Well-known Intrinsic Objects (Extensions)</figcaption>

      <table class="real-table">
        <thead>
          <tr>
            <th>Intrinsic Name</th>
            <th>Global Name</th>
            <th>ECMAScript Language Association</th>
          </tr>
        </thead>
        <tbody><tr>
          <td><dfn>%Date_now%</dfn></td>
          <td><code>Date.now</code></td>
          <td>The initial value of the <code>now</code> data property of the intrinsic <emu-xref href="#sec-date-constructor"><a href="https://tc39.github.io/ecma262/#sec-date-constructor">%Date%</a></emu-xref> (ES2019,  <emu-xref href="#sec-date.now"><a href="https://tc39.github.io/ecma262/#sec-date.now">20.3.3.1</a></emu-xref>)</td>
        </tr>
        <tr>
          <td><emu-xref href="#intl-object" id="_ref_105"><a href="#intl-object">%Intl%</a></emu-xref></td>
          <td><code>Intl</code></td>
          <td>The <code>Intl</code> object (<emu-xref href="#intl-object" id="_ref_2"><a href="#intl-object">8</a></emu-xref>).</td>
        </tr>
        <tr>
          <td><emu-xref href="#sec-the-intl-collator-constructor" id="_ref_106"><a href="#sec-the-intl-collator-constructor">%Collator%</a></emu-xref></td>
          <td><code>Intl.Collator</code></td>
          <td>The <code>Intl.Collator</code> constructor (<emu-xref href="#sec-the-intl-collator-constructor" id="_ref_3"><a href="#sec-the-intl-collator-constructor">10.1</a></emu-xref>)</td>
        </tr>
        <tr>
          <td><emu-xref href="#sec-properties-of-the-intl-collator-prototype-object" id="_ref_107"><a href="#sec-properties-of-the-intl-collator-prototype-object">%CollatorPrototype%</a></emu-xref></td>
          <td><code>Intl.Collator.prototype</code></td>
          <td>The initial value of the <code>prototype</code> data property of the intrinsic <emu-xref href="#sec-the-intl-collator-constructor" id="_ref_108"><a href="#sec-the-intl-collator-constructor">%Collator%</a></emu-xref> (<emu-xref href="#sec-intl.collator.prototype" id="_ref_4"><a href="#sec-intl.collator.prototype">10.2.1</a></emu-xref>).</td>
        </tr>
        <tr>
          <td><emu-xref href="#sec-intl-numberformat-constructor" id="_ref_109"><a href="#sec-intl-numberformat-constructor">%NumberFormat%</a></emu-xref></td>
          <td><code>Intl.NumberFormat</code></td>
          <td>The <code>Intl.NumberFormat</code> constructor (<emu-xref href="#sec-intl-numberformat-constructor" id="_ref_5"><a href="#sec-intl-numberformat-constructor">11.2</a></emu-xref>)</td>
        </tr>
        <tr>
          <td><emu-xref href="#sec-properties-of-intl-numberformat-prototype-object" id="_ref_110"><a href="#sec-properties-of-intl-numberformat-prototype-object">%NumberFormatPrototype%</a></emu-xref></td>
          <td><code>Intl.NumberFormat.prototype</code></td>
          <td>The initial value of the <code>prototype</code> data property of the intrinsic <emu-xref href="#sec-intl-numberformat-constructor" id="_ref_111"><a href="#sec-intl-numberformat-constructor">%NumberFormat%</a></emu-xref> (<emu-xref href="#sec-intl.numberformat.prototype" id="_ref_6"><a href="#sec-intl.numberformat.prototype">11.3.1</a></emu-xref>).</td>
        </tr>
        <tr>
          <td><emu-xref href="#sec-intl-datetimeformat-constructor" id="_ref_112"><a href="#sec-intl-datetimeformat-constructor">%DateTimeFormat%</a></emu-xref></td>
          <td><code>Intl.DateTimeFormat</code></td>
          <td>The <code>Intl.DateTimeFormat</code> constructor (<emu-xref href="#sec-intl-datetimeformat-constructor" id="_ref_7"><a href="#sec-intl-datetimeformat-constructor">12.2</a></emu-xref>).</td>
        </tr>
        <tr>
          <td><emu-xref href="#sec-properties-of-intl-datetimeformat-prototype-object" id="_ref_113"><a href="#sec-properties-of-intl-datetimeformat-prototype-object">%DateTimeFormatPrototype%</a></emu-xref></td>
          <td><code>Intl.DateTimeFormat.prototype</code></td>
          <td>The initial value of the <code>prototype</code> data property of the intrinsic <emu-xref href="#sec-intl-datetimeformat-constructor" id="_ref_114"><a href="#sec-intl-datetimeformat-constructor">%DateTimeFormat%</a></emu-xref> (<emu-xref href="#sec-intl.datetimeformat.prototype" id="_ref_8"><a href="#sec-intl.datetimeformat.prototype">12.3.1</a></emu-xref>).</td>
        </tr>
        <tr>
          <td><emu-xref href="#sec-intl-pluralrules-constructor" id="_ref_115"><a href="#sec-intl-pluralrules-constructor">%PluralRules%</a></emu-xref></td>
          <td><code>Intl.PluralRules</code></td>
          <td>The <code>Intl.PluralRules</code> constructor (<emu-xref href="#sec-intl-pluralrules-constructor" id="_ref_9"><a href="#sec-intl-pluralrules-constructor">13.2</a></emu-xref>).</td>
        </tr>
        <tr>
          <td><emu-xref href="#sec-properties-of-intl-pluralrules-prototype-object" id="_ref_116"><a href="#sec-properties-of-intl-pluralrules-prototype-object">%PluralRulesPrototype%</a></emu-xref></td>
          <td><code>Intl.PluralRules.prototype</code></td>
          <td>The initial value of the <code>prototype</code> data property of the intrinsic <emu-xref href="#sec-intl-pluralrules-constructor" id="_ref_117"><a href="#sec-intl-pluralrules-constructor">%PluralRules%</a></emu-xref> (<emu-xref href="#sec-intl.pluralrules.prototype" id="_ref_10"><a href="#sec-intl.pluralrules.prototype">13.3.1</a></emu-xref>).</td>
        </tr>
        <tr>
          <td><dfn>%StringProto_indexOf%</dfn></td>
          <td><code>String.prototype.indexOf</code></td>
          <td>The initial value of the <code>indexOf</code> data property of the intrinsic <emu-xref href="#sec-properties-of-the-string-prototype-object"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-string-prototype-object">%StringPrototype%</a></emu-xref> (ES2019,  <emu-xref href="#sec-string.prototype.indexof"><a href="https://tc39.github.io/ecma262/#sec-string.prototype.indexof">21.1.3.8</a></emu-xref>)</td>
        </tr>
      </tbody></table>
    </figure></emu-table>
  </emu-clause>
</emu-clause>
</emu-import>
<emu-import href="./locales-currencies-tz.html"><emu-clause id="locales-currencies-tz">
  <h1><span class="secnum">6</span>Identification of Locales, Currencies, and Time Zones</h1>

  <p>
    This clause describes the String values used in the ECMAScript 2019 Internationalization API Specification to identify locales, currencies, and time zones.

  </p>

  <emu-clause id="sec-case-sensitivity-and-case-mapping">
    <h1><span class="secnum">6.1</span>Case Sensitivity and Case Mapping</h1>

    <p>
      The String values used to identify locales, currencies, and time zones are interpreted in a case-insensitive manner, treating the Unicode Basic Latin characters <code>"A"</code> to <code>"Z"</code> (U+0041 to U+005A) as equivalent to the corresponding Basic Latin characters <code>"a"</code> to <code>"z"</code> (U+0061 to U+007A). No other case folding equivalences are applied. When mapping to upper case, a mapping shall be used that maps characters in the range <code>"a"</code> to <code>"z"</code> (U+0061 to U+007A) to the corresponding characters in the range <code>"A"</code> to <code>"Z"</code> (U+0041 to U+005A) and maps no other characters to the latter range.

    </p>

    <p>
      EXAMPLES <code>"ß"</code> (U+00DF) must not match or be mapped to <code>"SS"</code> (U+0053, U+0053). <code>"ı"</code> (U+0131) must not match or be mapped to <code>"I"</code> (U+0049).

    </p>
  </emu-clause>

  <emu-clause id="sec-language-tags">
    <h1><span class="secnum">6.2</span>Language Tags</h1>

    <p>
      The ECMAScript 2019 Internationalization API Specification identifies locales using language tags as defined by IETF BCP 47 (RFCs 5646 and 4647 or their successors), which may include extensions such as those registered through RFC 6067. Their canonical form is specified in RFC 5646 section 4.5 or its successor.

    </p>

    <p>
      BCP 47 language tags that meet those validity criteria of RFC 5646 section 2.2.9 that can be verified without reference to the IANA Language Subtag Registry are considered structurally valid. All structurally valid language tags are valid for use with the APIs defined by this standard. However, the set of locales and thus language tags that an implementation supports with adequate localizations is implementation dependent. The constructors Collator, NumberFormat, DateTimeFormat, and PluralRules map the language tags used in requests to locales supported by their respective implementations.

    </p>


    <emu-clause id="sec-unicode-locale-extension-sequences">
      <h1><span class="secnum">6.2.1</span>Unicode Locale Extension Sequences</h1>

      <p>
        This standard uses the term <code>"Unicode locale extension sequence"</code> for any substring of a language tag that is not part of a private use subtag sequence, starts with a separator <code>"-"</code> and the singleton <code>"u"</code>, and includes the maximum sequence of following non-singleton subtags and their preceding <code>"-"</code> separators.

      </p>
    </emu-clause>

    <emu-clause id="sec-isstructurallyvalidlanguagetag" aoid="IsStructurallyValidLanguageTag">
      <h1><span class="secnum">6.2.2</span>IsStructurallyValidLanguageTag ( <var>locale</var> )</h1>

      <p>
        The IsStructurallyValidLanguageTag abstract operation verifies that the <var>locale</var> argument (which must be a String value)

      </p>

      <ul>
        <li>represents a well-formed BCP 47 language tag as specified in RFC 5646 section 2.1, or successor,</li>
        <li>does not include duplicate variant subtags, and</li>
        <li>does not include duplicate singleton subtags.</li>
      </ul>

      <p>
        The abstract operation returns true if <var>locale</var> can be generated from the ABNF grammar in section 2.1 of the RFC, starting with Language-Tag, and does not contain duplicate variant or singleton subtags (other than as a private use subtag). It returns false otherwise. Terminal value characters in the grammar are interpreted as the Unicode equivalents of the ASCII octet values given.

      </p>
    </emu-clause>

    <emu-clause id="sec-canonicalizelanguagetag" aoid="CanonicalizeLanguageTag">
      <h1><span class="secnum">6.2.3</span>CanonicalizeLanguageTag ( <var>locale</var> )</h1>

      <p>
        The CanonicalizeLanguageTag abstract operation returns the canonical and case-regularized form of the <var>locale</var> argument (which must be a String value that is a structurally valid BCP 47 language tag as verified by the <emu-xref aoid="IsStructurallyValidLanguageTag" id="_ref_118"><a href="#sec-isstructurallyvalidlanguagetag">IsStructurallyValidLanguageTag</a></emu-xref> abstract operation).
        A conforming implementation shall take the steps specified in RFC 5646 section 4.5, or successor, to bring the language tag into canonical form, and to regularize the case of the subtags. Furthermore, a conforming implementation shall not take the steps to bring a language tag into <code>"extlang form"</code>, nor shall it reorder variant subtags.

      </p>

      <p>
        The specifications for extensions to BCP 47 language tags, such as RFC 6067, may include canonicalization rules for the extension subtag sequences they define that go beyond the canonicalization rules of RFC 5646 section 4.5. Implementations are allowed, but not required, to apply these additional rules.

      </p>
    </emu-clause>

    <emu-clause id="sec-defaultlocale" aoid="DefaultLocale">
      <h1><span class="secnum">6.2.4</span>DefaultLocale ()</h1>

      <p>
        The DefaultLocale abstract operation returns a String value representing the structurally valid (<emu-xref href="#sec-isstructurallyvalidlanguagetag" id="_ref_11"><a href="#sec-isstructurallyvalidlanguagetag">6.2.2</a></emu-xref>) and  canonicalized (<emu-xref href="#sec-canonicalizelanguagetag" id="_ref_12"><a href="#sec-canonicalizelanguagetag">6.2.3</a></emu-xref>) BCP 47 language tag for the host environment's current locale.

      </p>
    </emu-clause>

  </emu-clause>

  <emu-clause id="sec-currency-codes">
    <h1><span class="secnum">6.3</span>Currency Codes</h1>

    <p>
      The ECMAScript 2019 Internationalization API Specification identifies currencies using 3-letter currency codes as defined by ISO 4217. Their canonical form is upper case.

    </p>

    <p>
      All well-formed 3-letter ISO 4217 currency codes are allowed. However, the set of combinations of currency code and language tag for which localized currency symbols are available is implementation dependent. Where a localized currency symbol is not available, the ISO 4217 currency code is used for formatting.

    </p>

    <emu-clause id="sec-iswellformedcurrencycode" aoid="IsWellFormedCurrencyCode">
      <h1><span class="secnum">6.3.1</span>IsWellFormedCurrencyCode ( <var>currency</var> )</h1>

      <p>
        The IsWellFormedCurrencyCode abstract operation verifies that the <var>currency</var> argument (which must be a String value) represents a well-formed 3-letter ISO currency code. The following steps are taken:

      </p>

      <emu-alg><ol><li>Let <var>normalized</var> be the result of mapping <var>currency</var> to upper case as described in <emu-xref href="#sec-case-sensitivity-and-case-mapping" id="_ref_13"><a href="#sec-case-sensitivity-and-case-mapping">6.1</a></emu-xref>.</li><li>If the number of elements in <var>normalized</var> is not 3, return <emu-val>false</emu-val>.</li><li>If <var>normalized</var> contains any character that is not in the range <code>"A"</code> to <code>"Z"</code> (U+0041 to U+005A), return <emu-val>false</emu-val>.</li><li>Return <emu-val>true</emu-val>.
      </li></ol></emu-alg>
    </emu-clause>

  </emu-clause>

  <emu-clause id="sec-time-zone-names">
    <h1><span class="secnum">6.4</span>Time Zone Names</h1>

    <p>
      The ECMAScript 2019 Internationalization API Specification identifies time zones using the Zone and Link names of the IANA Time Zone Database. Their canonical form is the corresponding Zone name in the casing used in the IANA Time Zone Database.

    </p>

    <p>
      All registered Zone and Link names are allowed. Implementations must recognize all such names, and use best available current and historical information about their offsets from UTC and their daylight saving time rules in calculations. However, the set of combinations of time zone name and language tag for which localized time zone names are available is implementation dependent.

    </p>

    <emu-clause id="sec-isvalidtimezonename" aoid="IsValidTimeZoneName">
      <h1><span class="secnum">6.4.1</span>IsValidTimeZoneName ( <var>timeZone</var> )</h1>

      <p>
        The IsValidTimeZoneName abstract operation verifies that the <var>timeZone</var> argument (which must be a String value) represents a valid Zone or Link name of the IANA Time Zone Database.

      </p>
      <p>
        The abstract operation returns true if <var>timeZone</var>, converted to upper case as described in  <emu-xref href="#sec-case-sensitivity-and-case-mapping" id="_ref_14"><a href="#sec-case-sensitivity-and-case-mapping">6.1</a></emu-xref>, is equal to one of the Zone or Link names of the IANA Time Zone Database, converted to upper case as described in  <emu-xref href="#sec-case-sensitivity-and-case-mapping" id="_ref_15"><a href="#sec-case-sensitivity-and-case-mapping">6.1</a></emu-xref>. It returns false otherwise.

      </p>
    </emu-clause>

    <emu-clause id="sec-canonicalizetimezonename" aoid="CanonicalizeTimeZoneName">
      <h1><span class="secnum">6.4.2</span>CanonicalizeTimeZoneName</h1>

      <p>
        The CanonicalizeTimeZoneName abstract operation returns the canonical and case-regularized form of the <var>timeZone</var> argument (which must be a String value that is a valid time zone name as verified by the <emu-xref aoid="IsValidTimeZoneName" id="_ref_119"><a href="#sec-isvalidtimezonename">IsValidTimeZoneName</a></emu-xref> abstract operation). The following steps are taken:

      </p>

      <emu-alg><ol><li>Let <var>ianaTimeZone</var> be the Zone or Link name of the IANA Time Zone Database such that <var>timeZone</var>, converted to  upper case as described in <emu-xref href="#sec-case-sensitivity-and-case-mapping" id="_ref_16"><a href="#sec-case-sensitivity-and-case-mapping">6.1</a></emu-xref>, is equal to <var>ianaTimeZone</var>, converted to upper case as described in <emu-xref href="#sec-case-sensitivity-and-case-mapping" id="_ref_17"><a href="#sec-case-sensitivity-and-case-mapping">6.1</a></emu-xref>.</li><li>If <var>ianaTimeZone</var> is a Link name, let <var>ianaTimeZone</var> be the corresponding Zone name as specified in the <code>"backward"</code> file of the IANA Time Zone Database.</li><li>If <var>ianaTimeZone</var> is <code>"Etc/UTC"</code> or <code>"Etc/GMT"</code>, return <code>"UTC"</code>.</li><li>Return <var>ianaTimeZone</var>.
      </li></ol></emu-alg>

      <p>
        The Intl.DateTimeFormat constructor allows this time zone name; if the time zone is not specified, the host environment's current time zone is used. Implementations shall support UTC and the host environment's current time zone (if different from UTC) in formatting.

      </p>
    </emu-clause>

    <emu-clause id="sec-defaulttimezone" aoid="DefaultTimeZone">
      <h1><span class="secnum">6.4.3</span>DefaultTimeZone ()</h1>

      <p>
        The DefaultTimeZone abstract operation returns a String value representing the valid (<emu-xref href="#sec-isvalidtimezonename" id="_ref_18"><a href="#sec-isvalidtimezonename">6.4.1</a></emu-xref>) and canonicalized (<emu-xref href="#sec-canonicalizetimezonename" id="_ref_19"><a href="#sec-canonicalizetimezonename">6.4.2</a></emu-xref>) time zone name for the host environment's current time zone.

      </p>
    </emu-clause>

  </emu-clause>

</emu-clause>
</emu-import>
<emu-import href="./requirements.html"><emu-clause id="requirements">
  <h1><span class="secnum">7</span>Requirements for Standard Built-in ECMAScript Objects</h1>

  <p>
    Unless specified otherwise in this document, the objects, functions, and constructors described in this standard are subject to the generic requirements and restrictions specified for standard built-in ECMAScript objects in the ECMAScript 2019 Language Specification, 10<sup>th</sup> edition, clause  <emu-xref href="#sec-ecmascript-standard-built-in-objects"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-standard-built-in-objects">17</a></emu-xref>, or successor.

  </p>
</emu-clause>
</emu-import>
<emu-import href="./intl.html"><emu-clause id="intl-object">
  <h1><span class="secnum">8</span>The Intl Object</h1>
  <p>
    The Intl object is the  <dfn>%Intl%</dfn> intrinsic object and the initial value of the <code>Intl</code> property of the <emu-xref href="#global-object"><a href="https://tc39.github.io/ecma262/#global-object">global object</a></emu-xref>. The Intl object is a single ordinary object.

  </p>

  <p>
    The value of the [[Prototype]] internal slot of the Intl object is the intrinsic object <emu-xref href="#sec-properties-of-the-object-prototype-object"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>.

  </p>

  <p>
    The Intl object is not a function object. It does not have a [[Construct]] internal method; it is not possible to use the Intl object as a constructor with the <emu-val>new</emu-val> operator. The Intl object does not have a [[Call]] internal method; it is not possible to invoke the Intl object as a function.

  </p>

  <p>
    The Intl object has an internal slot, [[FallbackSymbol]], which is a new <emu-xref href="#sec-symbol-constructor"><a href="https://tc39.github.io/ecma262/#sec-symbol-constructor">%Symbol%</a></emu-xref> in the current <emu-xref href="#realm"><a href="https://tc39.github.io/ecma262/#realm">realm</a></emu-xref> with the [[Description]] <code>"IntlLegacyConstructedSymbol"</code>

  </p>

  <emu-clause id="sec-constructor-properties-of-the-intl-object">
    <h1><span class="secnum">8.1</span>Constructor Properties of the Intl Object</h1>

    <emu-clause id="sec-intl.collator-intro">
      <h1><span class="secnum">8.1.1</span>Intl.Collator (...)</h1>
      <p>
        See  <emu-xref href="#collator-objects" id="_ref_20"><a href="#collator-objects">10</a></emu-xref>.

      </p>
    </emu-clause>

    <emu-clause id="sec-intl.numberformat-intro">
      <h1><span class="secnum">8.1.2</span>Intl.NumberFormat (...)</h1>
      <p>
        See  <emu-xref href="#numberformat-objects" id="_ref_21"><a href="#numberformat-objects">11</a></emu-xref>.

      </p>
    </emu-clause>

    <emu-clause id="sec-intl.datetimeformat-intro">
      <h1><span class="secnum">8.1.3</span>Intl.DateTimeFormat (...)</h1>
      <p>
        See  <emu-xref href="#datetimeformat-objects" id="_ref_22"><a href="#datetimeformat-objects">12</a></emu-xref>.

      </p>
    </emu-clause>

    <emu-clause id="sec-intl.pluralrules-intro">
      <h1><span class="secnum">8.1.4</span>Intl.PluralRules (...)</h1>
      <p>
        See  <emu-xref href="#pluralrules-objects" id="_ref_23"><a href="#pluralrules-objects">13</a></emu-xref>.

      </p>
    </emu-clause>

    <emu-note id="legacy-constructor"><span class="note"><a href="#legacy-constructor">Note</a></span><div class="note-contents">
      In ECMA 402 v1, Intl constructors supported a mode of operation where calling them with an existing object as a receiver would transform the receiver into the relevant Intl instance with all internal slots. In ECMA 402 v2, this capability was removed, to avoid adding internal slots on existing objects. In ECMA 402 v3, the capability was re-added as "normative optional" in a mode which chains the underlying Intl instance on any object, when the constructor is called. See  <a href="https://github.com/tc39/ecma402/issues/57">Issue 57</a> for details.

    </div></emu-note>

  </emu-clause>

  <emu-clause id="sec-function-properties-of-the-intl-object">
    <h1><span class="secnum">8.2</span>Function Properties of the Intl Object</h1>

    <emu-clause id="sec-intl.getcanonicallocales">
      <h1><span class="secnum">8.2.1</span>Intl.getCanonicalLocales ( <var>locales</var> )</h1>

      <p>
        When the <code>getCanonicalLocales</code> method is called with argument <var>locales</var>, the following steps are taken:

      </p>

      <emu-alg><ol><li>Let <var>ll</var> be ?&nbsp;<emu-xref aoid="CanonicalizeLocaleList" id="_ref_120"><a href="#sec-canonicalizelocalelist">CanonicalizeLocaleList</a></emu-xref>(<var>locales</var>).</li><li>Return <emu-xref aoid="CreateArrayFromList" id="_ref_121"><a href="https://tc39.github.io/ecma262/#sec-createarrayfromlist">CreateArrayFromList</a></emu-xref>(<var>ll</var>).
      </li></ol></emu-alg>
    </emu-clause>

  </emu-clause>

</emu-clause>
</emu-import>
<emu-import href="./negotiation.html"><emu-clause id="locale-and-parameter-negotiation">
  <h1><span class="secnum">9</span>Locale and Parameter Negotiation</h1>

  <p>
    The constructors for the objects providing locale sensitive services, Collator, NumberFormat, DateTimeFormat, and PluralRules, use a common pattern to negotiate the requests represented by the locales and options arguments against the actual capabilities of their implementations. The common behaviour is described here in terms of internal slots describing the capabilities and of abstract operations using these internal slots.

  </p>

  <emu-clause id="sec-internal-slots">
    <h1><span class="secnum">9.1</span>Internal slots of Service Constructors</h1>

    <p>
      The constructors Intl.Collator, Intl.NumberFormat, Intl.DateTimeFormat, and Intl.PluralRules have the following internal slots:

    </p>

    <ul>
      <li>[[AvailableLocales]] is a <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">List</a></emu-xref> that contains structurally valid (<emu-xref href="#sec-isstructurallyvalidlanguagetag" id="_ref_24"><a href="#sec-isstructurallyvalidlanguagetag">6.2.2</a></emu-xref>) and canonicalized (<emu-xref href="#sec-canonicalizelanguagetag" id="_ref_25"><a href="#sec-canonicalizelanguagetag">6.2.3</a></emu-xref>) BCP 47 language tags identifying the locales for which the implementation provides the functionality of the constructed objects. Language tags on the list must not have a Unicode locale extension sequence. The list must include the value returned by the <emu-xref aoid="DefaultLocale" id="_ref_122"><a href="#sec-defaultlocale">DefaultLocale</a></emu-xref> abstract operation (<emu-xref href="#sec-defaultlocale" id="_ref_26"><a href="#sec-defaultlocale">6.2.4</a></emu-xref>), and must not include duplicates. Implementations must include in [[AvailableLocales]] locales that can serve as fallbacks in the algorithm used to resolve locales (see  <emu-xref href="#sec-resolvelocale" id="_ref_27"><a href="#sec-resolvelocale">9.2.6</a></emu-xref>). For example, implementations that provide a <code>"de-DE"</code> locale must include a <code>"de"</code> locale that can serve as a fallback for requests such as <code>"de-AT"</code> and <code>"de-CH"</code>. For locales that in current usage would include a script subtag (such as Chinese locales), old-style language tags without script subtags must be included such that, for example, requests for <code>"zh-TW"</code> and <code>"zh-HK"</code> lead to output in traditional Chinese rather than the default simplified Chinese. The ordering of the locales within [[AvailableLocales]] is irrelevant.</li>
      <li>[[RelevantExtensionKeys]] is a <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">List</a></emu-xref> of keys of the language tag extensions defined in Unicode Technical Standard 35 that are relevant for the functionality of the constructed objects.</li>
      <li>[[SortLocaleData]] and [[SearchLocaleData]] (for Intl.Collator) and [[LocaleData]] (for Intl.NumberFormat, Intl.DateTimeFormat, and Intl.PluralRules) are records that have fields for each locale contained in [[AvailableLocales]]. The value of each of these fields must be a record that has fields for each key contained in [[RelevantExtensionKeys]]. The value of each of these fields must be a non-empty list of those values defined in Unicode Technical Standard 35 for the given key that are supported by the implementation for the given locale, with the first element providing the default value.</li>
    </ul>

    <p>
      EXAMPLE     An implementation of DateTimeFormat might include the language tag <code>"th"</code> in its [[AvailableLocales]] internal slot, and must (according to  <emu-xref href="#sec-intl.datetimeformat-internal-slots" id="_ref_28"><a href="#sec-intl.datetimeformat-internal-slots">12.3.3</a></emu-xref>) include the key <code>"ca"</code> in its [[RelevantExtensionKeys]] internal slot. For Thai, the <code>"buddhist"</code> calendar is usually the default, but an implementation might also support the calendars <code>"gregory"</code>, <code>"chinese"</code>, and <code>"islamicc"</code> for the locale <code>"th"</code>. The [[LocaleData]] internal slot would therefore at least include {[[th]]: {[[ca]]: « <code>"buddhist"</code>, <code>"gregory"</code>, <code>"chinese"</code>, <code>"islamicc"</code> »}}.

    </p>
  </emu-clause>

  <emu-clause id="sec-abstract-operations">
    <h1><span class="secnum">9.2</span>Abstract Operations</h1>

    <p>
      Where the following abstract operations take an <var>availableLocales</var> argument, it must be an [[AvailableLocales]] <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">List</a></emu-xref> as specified in  <emu-xref href="#sec-internal-slots" id="_ref_29"><a href="#sec-internal-slots">9.1</a></emu-xref>.

    </p>

    <emu-clause id="sec-canonicalizelocalelist" aoid="CanonicalizeLocaleList">
      <h1><span class="secnum">9.2.1</span>CanonicalizeLocaleList ( <var>locales</var> )</h1>

      <p>
        The abstract operation CanonicalizeLocaleList takes the following steps:

      </p>

      <emu-alg><ol><li>If <var>locales</var> is <emu-val>undefined</emu-val>, then<ol><li>Return a new empty <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">List</a></emu-xref>.</li></ol></li><li>Let <var>seen</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>If <emu-xref aoid="Type" id="_ref_123"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>locales</var>) is String, then<ol><li>Let <var>O</var> be <emu-xref aoid="CreateArrayFromList" id="_ref_124"><a href="https://tc39.github.io/ecma262/#sec-createarrayfromlist">CreateArrayFromList</a></emu-xref>(« <var>locales</var> »).</li></ol></li><li>Else,<ol><li>Let <var>O</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_125"><a href="https://tc39.github.io/ecma262/#sec-toobject">ToObject</a></emu-xref>(<var>locales</var>).</li></ol></li><li>Let <var>len</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_126"><a href="https://tc39.github.io/ecma262/#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_127"><a href="https://tc39.github.io/ecma262/#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <code>"length"</code>)).</li><li>Let <var>k</var> be 0.</li><li>Repeat, while <var>k</var> &lt; <var>len</var><ol><li>Let <var>Pk</var> be <emu-xref aoid="ToString" id="_ref_128"><a href="https://tc39.github.io/ecma262/#sec-tostring">ToString</a></emu-xref>(<var>k</var>).</li><li>Let <var>kPresent</var> be ?&nbsp;<emu-xref aoid="HasProperty" id="_ref_129"><a href="https://tc39.github.io/ecma262/#sec-hasproperty">HasProperty</a></emu-xref>(<var>O</var>, <var>Pk</var>).</li><li>If <var>kPresent</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>kValue</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_130"><a href="https://tc39.github.io/ecma262/#sec-get-o-p">Get</a></emu-xref>(<var>O</var>, <var>Pk</var>).</li><li>If <emu-xref aoid="Type" id="_ref_131"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>kValue</var>) is not String or Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>tag</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_132"><a href="https://tc39.github.io/ecma262/#sec-tostring">ToString</a></emu-xref>(<var>kValue</var>).</li><li>If <emu-xref aoid="IsStructurallyValidLanguageTag" id="_ref_133"><a href="#sec-isstructurallyvalidlanguagetag">IsStructurallyValidLanguageTag</a></emu-xref>(<var>tag</var>) is <emu-val>false</emu-val>, throw a <emu-val>RangeError</emu-val> exception.</li><li>Let <var>canonicalizedTag</var> be <emu-xref aoid="CanonicalizeLanguageTag" id="_ref_134"><a href="#sec-canonicalizelanguagetag">CanonicalizeLanguageTag</a></emu-xref>(<var>tag</var>).</li><li>If <var>canonicalizedTag</var> is not an element of <var>seen</var>, append <var>canonicalizedTag</var> as the last element of <var>seen</var>.</li></ol></li><li>Increase <var>k</var> by 1.</li></ol></li><li>Return <var>seen</var>.
      </li></ol></emu-alg>

      <emu-note><span class="note">Note 1</span><div class="note-contents">
        Non-normative summary: The abstract operation interprets the <var>locales</var> argument as an array and copies its elements into a <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">List</a></emu-xref>, validating the elements as structurally valid language tags and canonicalizing them, and omitting duplicates.

      </div></emu-note>

      <emu-note><span class="note">Note 2</span><div class="note-contents">
        Requiring <var>kValue</var> to be a String or Object means that the Number value <emu-val>NaN</emu-val> will not be interpreted as the language tag <code>"nan"</code>, which stands for Min Nan Chinese.

      </div></emu-note>
    </emu-clause>

    <emu-clause id="sec-bestavailablelocale" aoid="BestAvailableLocale">
      <h1><span class="secnum">9.2.2</span>BestAvailableLocale ( <var>availableLocales</var>, <var>locale</var> )</h1>

      <p>
        The BestAvailableLocale abstract operation compares the provided argument <var>locale</var>, which must be a String value with a structurally valid and canonicalized BCP 47 language tag, against the locales in <var>availableLocales</var> and returns either the longest non-empty prefix of <var>locale</var> that is an element of <var>availableLocales</var>, or <emu-val>undefined</emu-val> if there is no such element. It uses the fallback mechanism of RFC 4647, section 3.4. The following steps are taken:

      </p>

      <emu-alg><ol><li>Let <var>candidate</var> be <var>locale</var>.</li><li>Repeat,<ol><li>If <var>availableLocales</var> contains an element equal to <var>candidate</var>, return <var>candidate</var>.</li><li>Let <var>pos</var> be the character index of the last occurrence of <code>"-"</code> (U+002D) within <var>candidate</var>. If that character does not occur, return <emu-val>undefined</emu-val>.</li><li>If <var>pos</var> ≥ 2 and the character <code>"-"</code> occurs at index <var>pos</var>-2 of candidate, decrease <var>pos</var> by 2.</li><li>Let <var>candidate</var> be the substring of <var>candidate</var> from position 0, inclusive, to position <var>pos</var>, exclusive.
      </li></ol></li></ol></emu-alg>
    </emu-clause>

    <emu-clause id="sec-lookupmatcher" aoid="LookupMatcher">
      <h1><span class="secnum">9.2.3</span>LookupMatcher ( <var>availableLocales</var>, <var>requestedLocales</var> )</h1>

      <p>
        The LookupMatcher abstract operation compares <var>requestedLocales</var>, which must be a <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">List</a></emu-xref> as returned by <emu-xref aoid="CanonicalizeLocaleList" id="_ref_135"><a href="#sec-canonicalizelocalelist">CanonicalizeLocaleList</a></emu-xref>, against the locales in <var>availableLocales</var> and determines the best available language to meet the request. The following steps are taken:

      </p>

      <emu-alg><ol><li>Let <var>result</var> be a new <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref>.</li><li>For each element <var>locale</var> of <var>requestedLocales</var> in <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">List</a></emu-xref> order, do<ol><li>Let <var>noExtensionsLocale</var> be the String value that is <var>locale</var> with all Unicode locale extension sequences removed.</li><li>Let <var>availableLocale</var> be <emu-xref aoid="BestAvailableLocale" id="_ref_136"><a href="#sec-bestavailablelocale">BestAvailableLocale</a></emu-xref>(<var>availableLocales</var>, <var>noExtensionsLocale</var>).</li><li>If <var>availableLocale</var> is not <emu-val>undefined</emu-val>, then<ol><li>Set <var>result</var>.[[locale]] to <var>availableLocale</var>.</li><li>If <var>locale</var> and <var>noExtensionsLocale</var> are not the same String value, then<ol><li>Let <var>extension</var> be the String value consisting of the first substring of <var>locale</var> that is a Unicode locale extension sequence.</li><li>Set <var>result</var>.[[extension]] to <var>extension</var>.</li></ol></li><li>Return <var>result</var>.</li></ol></li></ol></li><li>Let <var>defLocale</var> be <emu-xref aoid="DefaultLocale" id="_ref_137"><a href="#sec-defaultlocale">DefaultLocale</a></emu-xref>().</li><li>Set <var>result</var>.[[locale]] to <var>defLocale</var>.</li><li>Return <var>result</var>.
      </li></ol></emu-alg>

      <emu-note><span class="note">Note</span><div class="note-contents">
        The algorithm is based on the Lookup algorithm described in RFC 4647 section 3.4, but options specified through Unicode locale extension sequences are ignored in the lookup. Information about such subsequences is returned separately. The abstract operation returns a record with a [[locale]] field, whose value is the language tag of the selected locale, which must be an element of <var>availableLocales</var>. If the language tag of the request locale that led to the selected locale contained a Unicode locale extension sequence, then the returned record also contains an [[extension]] field whose value is the first Unicode locale extension sequence within the request locale language tag.

      </div></emu-note>
    </emu-clause>

    <emu-clause id="sec-bestfitmatcher" aoid="BestFitMatcher">
      <h1><span class="secnum">9.2.4</span>BestFitMatcher ( <var>availableLocales</var>, <var>requestedLocales</var> )</h1>

      <p>
        The BestFitMatcher abstract operation compares <var>requestedLocales</var>, which must be a <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">List</a></emu-xref> as returned by <emu-xref aoid="CanonicalizeLocaleList" id="_ref_138"><a href="#sec-canonicalizelocalelist">CanonicalizeLocaleList</a></emu-xref>, against the locales in <var>availableLocales</var> and determines the best available language to meet the request. The algorithm is implementation dependent, but should produce results that a typical user of the requested locales would perceive as at least as good as those produced by the <emu-xref aoid="LookupMatcher" id="_ref_139"><a href="#sec-lookupmatcher">LookupMatcher</a></emu-xref> abstract operation. Options specified through Unicode locale extension sequences must be ignored by the algorithm. Information about such subsequences is returned separately. The abstract operation returns a record with a [[locale]] field, whose value is the language tag of the selected locale, which must be an element of <var>availableLocales</var>. If the language tag of the request locale that led to the selected locale contained a Unicode locale extension sequence, then the returned record also contains an [[extension]] field whose value is the first Unicode locale extension sequence within the request locale language tag.

      </p>
    </emu-clause>

    <emu-clause id="sec-unicodeextensionvalue" aoid="UnicodeExtensionValue">
      <h1><span class="secnum">9.2.5</span>UnicodeExtensionValue ( <var>extension</var>, <var>key</var> )</h1>

      <p>The abstract operation UnicodeExtensionValue is called with <var>extension</var>, which must be a Unicode locale extension sequence, and String <var>key</var>. This operation returns the type subtags for <var>key</var> by performing the following steps:</p>

      <emu-alg><ol><li>Assert: The number of elements in <var>key</var> is 2.</li><li>Let <var>size</var> be the number of elements in <var>extension</var>.</li><li>Let <var>searchValue</var> be the concatenation of <code>"-"</code>, <var>key</var>, and <code>"-"</code>.</li><li>Let <var>pos</var> be <emu-xref aoid="Call" id="_ref_140"><a href="https://tc39.github.io/ecma262/#sec-call">Call</a></emu-xref>(<emu-xref href="#sec-402-well-known-intrinsic-objects" id="_ref_141"><a href="#sec-402-well-known-intrinsic-objects">%StringProto_indexOf%</a></emu-xref>, <var>extension</var>, « <var>searchValue</var> »).</li><li>If <var>pos</var> ≠ -1, then<ol><li>Let <var>start</var> be <var>pos</var> + 4.</li><li>Let <var>end</var> be <var>start</var>.</li><li>Let <var>k</var> be <var>start</var>.</li><li>Let <var>done</var> be <emu-val>false</emu-val>.</li><li>Repeat, while <var>done</var> is <emu-val>false</emu-val><ol><li>Let <var>e</var> be <emu-xref aoid="Call" id="_ref_142"><a href="https://tc39.github.io/ecma262/#sec-call">Call</a></emu-xref>(<emu-xref href="#sec-402-well-known-intrinsic-objects" id="_ref_143"><a href="#sec-402-well-known-intrinsic-objects">%StringProto_indexOf%</a></emu-xref>, <var>extension</var>, « <code>"-"</code>, <var>k</var> »).</li><li>If <var>e</var> = -1, let <var>len</var> be <var>size</var> - <var>k</var>; else let <var>len</var> be <var>e</var> - <var>k</var>.</li><li>If <var>len</var> = 2, then<ol><li>Let <var>done</var> be <emu-val>true</emu-val>.</li></ol></li><li>Else if <var>e</var> = -1, then<ol><li>Let <var>end</var> be <var>size</var>.</li><li>Let <var>done</var> be <emu-val>true</emu-val>.</li></ol></li><li>Else,<ol><li>Let <var>end</var> be <var>e</var>.</li><li>Let <var>k</var> be <var>e</var> + 1.</li></ol></li></ol></li><li>Return the String value equal to the substring of <var>extension</var> consisting of the code units at indices <var>start</var> (inclusive) through <var>end</var> (exclusive).</li></ol></li><li>Let <var>searchValue</var> be the concatenation of <code>"-"</code> and <var>key</var>.</li><li>Let <var>pos</var> be <emu-xref aoid="Call" id="_ref_144"><a href="https://tc39.github.io/ecma262/#sec-call">Call</a></emu-xref>(<emu-xref href="#sec-402-well-known-intrinsic-objects" id="_ref_145"><a href="#sec-402-well-known-intrinsic-objects">%StringProto_indexOf%</a></emu-xref>, <var>extension</var>, « <var>searchValue</var> »).</li><li>If <var>pos</var> ≠ -1 and <var>pos</var> + 3 = <var>size</var>, then<ol><li>Return the empty String.</li></ol></li><li>Return <emu-val>undefined</emu-val>.
      </li></ol></emu-alg>

      <emu-note><span class="note">Note</span><div class="note-contents">
        Non-normative summary: UnicodeExtensionValue returns the type subtags of the first keyword for a given key. For example, UnicodeExtensionValue(<code>"u-ca-ethiopic-amete-alem-ca-ethioaa"</code>, <code>"ca"</code>) returns <code>"ethiopic-amete-alem"</code>. If the keyword for <var>key</var> has no type subtags, UnicodeExtensionValue returns the empty String. If <var>extension</var> contains no keyword for <var>key</var>, <emu-val>undefined</emu-val> is returned.

      </div></emu-note>
    </emu-clause>

    <emu-clause id="sec-resolvelocale" aoid="ResolveLocale">
      <h1><span class="secnum">9.2.6</span>ResolveLocale ( <var>availableLocales</var>, <var>requestedLocales</var>, <var>options</var>, <var>relevantExtensionKeys</var>, <var>localeData</var> )</h1>

      <p>
        The ResolveLocale abstract operation compares a BCP 47 language priority list <var>requestedLocales</var> against the locales in <var>availableLocales</var> and determines the best available language to meet the request. <var>availableLocales</var>, <var>requestedLocales</var>, and <var>relevantExtensionKeys</var> must be provided as <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">List</a></emu-xref> values, <var>options</var> and <var>localeData</var> as Records.

      </p>

      <p>
        The following steps are taken:

      </p>

      <emu-alg><ol><li>Let <var>matcher</var> be <var>options</var>.[[localeMatcher]].</li><li>If <var>matcher</var> is <code>"lookup"</code>, then<ol><li>Let <var>r</var> be <emu-xref aoid="LookupMatcher" id="_ref_146"><a href="#sec-lookupmatcher">LookupMatcher</a></emu-xref>(<var>availableLocales</var>, <var>requestedLocales</var>).</li></ol></li><li>Else,<ol><li>Let <var>r</var> be <emu-xref aoid="BestFitMatcher" id="_ref_147"><a href="#sec-bestfitmatcher">BestFitMatcher</a></emu-xref>(<var>availableLocales</var>, <var>requestedLocales</var>).</li></ol></li><li>Let <var>foundLocale</var> be <var>r</var>.[[locale]].</li><li>Let <var>result</var> be a new <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref>.</li><li>Set <var>result</var>.[[dataLocale]] to <var>foundLocale</var>.</li><li>Let <var>supportedExtension</var> be <code>"-u"</code>.</li><li>For each element <var>key</var> of <var>relevantExtensionKeys</var> in <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">List</a></emu-xref> order, do<ol><li>Let <var>foundLocaleData</var> be <var>localeData</var>.[[&lt;<var>foundLocale</var>&gt;]].</li><li>Assert: <emu-xref aoid="Type" id="_ref_148"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>foundLocaleData</var>) is <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref>.</li><li>Let <var>keyLocaleData</var> be <var>foundLocaleData</var>.[[&lt;<var>key</var>&gt;]].</li><li>Assert: <emu-xref aoid="Type" id="_ref_149"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>keyLocaleData</var>) is <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Let <var>value</var> be <var>keyLocaleData</var>[0].</li><li>Assert: <emu-xref aoid="Type" id="_ref_150"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>value</var>) is either String or Null.</li><li>Let <var>supportedExtensionAddition</var> be <code>""</code>.</li><li>If <var>r</var> has an [[extension]] field, then<ol><li>Let <var>requestedValue</var> be <emu-xref aoid="UnicodeExtensionValue" id="_ref_151"><a href="#sec-unicodeextensionvalue">UnicodeExtensionValue</a></emu-xref>(<var>r</var>.[[extension]], <var>key</var>).</li><li>If <var>requestedValue</var> is not <emu-val>undefined</emu-val>, then<ol><li>If <var>requestedValue</var> is not the empty String, then<ol><li>If <var>keyLocaleData</var> contains <var>requestedValue</var>, then<ol><li>Let <var>value</var> be <var>requestedValue</var>.</li><li>Let <var>supportedExtensionAddition</var> be the concatenation of <code>"-"</code>, <var>key</var>, <code>"-"</code>, and <var>value</var>.</li></ol></li></ol></li><li>Else if <var>keyLocaleData</var> contains <code>"true"</code>, then<ol><li>Let <var>value</var> be <code>"true"</code>.</li></ol></li></ol></li></ol></li><li>If <var>options</var> has a field [[&lt;<var>key</var>&gt;]], then<ol><li>Let <var>optionsValue</var> be <var>options</var>.[[&lt;<var>key</var>&gt;]].</li><li>Assert: <emu-xref aoid="Type" id="_ref_152"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>optionsValue</var>) is either String, Undefined, or Null.</li><li>If <var>keyLocaleData</var> contains <var>optionsValue</var>, then<ol><li>If <emu-xref aoid="SameValue" id="_ref_153"><a href="https://tc39.github.io/ecma262/#sec-samevalue">SameValue</a></emu-xref>(<var>optionsValue</var>, <var>value</var>) is <emu-val>false</emu-val>, then<ol><li>Let <var>value</var> be <var>optionsValue</var>.</li><li>Let <var>supportedExtensionAddition</var> be <code>""</code>.</li></ol></li></ol></li></ol></li><li>Set <var>result</var>.[[&lt;<var>key</var>&gt;]] to <var>value</var>.</li><li>Append <var>supportedExtensionAddition</var> to <var>supportedExtension</var>.</li></ol></li><li>If the number of elements in <var>supportedExtension</var> is greater than 2, then<ol><li>Let <var>privateIndex</var> be <emu-xref aoid="Call" id="_ref_154"><a href="https://tc39.github.io/ecma262/#sec-call">Call</a></emu-xref>(<emu-xref href="#sec-402-well-known-intrinsic-objects" id="_ref_155"><a href="#sec-402-well-known-intrinsic-objects">%StringProto_indexOf%</a></emu-xref>, <var>foundLocale</var>, « <code>"-x-"</code> »).</li><li>If <var>privateIndex</var> = -1, then<ol><li>Let <var>foundLocale</var> be the concatenation of <var>foundLocale</var> and <var>supportedExtension</var>.</li></ol></li><li>Else,<ol><li>Let <var>preExtension</var> be the substring of <var>foundLocale</var> from position 0, inclusive, to position <var>privateIndex</var>, exclusive.</li><li>Let <var>postExtension</var> be the substring of <var>foundLocale</var> from position <var>privateIndex</var> to the end of the string.</li><li>Let <var>foundLocale</var> be the concatenation of <var>preExtension</var>, <var>supportedExtension</var>, and <var>postExtension</var>.</li></ol></li><li>Assert: <emu-xref aoid="IsStructurallyValidLanguageTag" id="_ref_156"><a href="#sec-isstructurallyvalidlanguagetag">IsStructurallyValidLanguageTag</a></emu-xref>(<var>foundLocale</var>) is <emu-val>true</emu-val>.</li><li>Let <var>foundLocale</var> be <emu-xref aoid="CanonicalizeLanguageTag" id="_ref_157"><a href="#sec-canonicalizelanguagetag">CanonicalizeLanguageTag</a></emu-xref>(<var>foundLocale</var>).</li></ol></li><li>Set <var>result</var>.[[locale]] to <var>foundLocale</var>.</li><li>Return <var>result</var>.
      </li></ol></emu-alg>

      <emu-note><span class="note">Note</span><div class="note-contents">
        Non-normative summary: Two algorithms are available to match the locales: the Lookup algorithm described in RFC 4647 section 3.4, and an implementation dependent best-fit algorithm. Independent of the locale matching algorithm, options specified through Unicode locale extension sequences are negotiated separately, taking the caller's relevant extension keys and locale data as well as client-provided options into consideration. The abstract operation returns a record with a [[locale]] field whose value is the language tag of the selected locale, and fields for each key in <var>relevantExtensionKeys</var> providing the selected value for that key.

      </div></emu-note>
    </emu-clause>

    <emu-clause id="sec-lookupsupportedlocales" aoid="LookupSupportedLocales">
      <h1><span class="secnum">9.2.7</span>LookupSupportedLocales ( <var>availableLocales</var>, <var>requestedLocales</var> )</h1>

      <p>
        The LookupSupportedLocales abstract operation returns the subset of the provided BCP 47 language priority list <var>requestedLocales</var> for which <var>availableLocales</var> has a matching locale when using the BCP 47 Lookup algorithm. Locales appear in the same order in the returned list as in <var>requestedLocales</var>. The following steps are taken:

      </p>

      <emu-alg><ol><li>Let <var>subset</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>For each element <var>locale</var> of <var>requestedLocales</var> in <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">List</a></emu-xref> order, do<ol><li>Let <var>noExtensionsLocale</var> be the String value that is <var>locale</var> with all Unicode locale extension sequences removed.</li><li>Let <var>availableLocale</var> be <emu-xref aoid="BestAvailableLocale" id="_ref_158"><a href="#sec-bestavailablelocale">BestAvailableLocale</a></emu-xref>(<var>availableLocales</var>, <var>noExtensionsLocale</var>).</li><li>If <var>availableLocale</var> is not <emu-val>undefined</emu-val>, append <var>locale</var> to the end of <var>subset</var>.</li></ol></li><li>Return <var>subset</var>.
      </li></ol></emu-alg>
    </emu-clause>

    <emu-clause id="sec-bestfitsupportedlocales" aoid="BestFitSupportedLocales">
      <h1><span class="secnum">9.2.8</span>BestFitSupportedLocales ( <var>availableLocales</var>, <var>requestedLocales</var> )</h1>

      <p>
        The BestFitSupportedLocales abstract operation returns the subset of the provided BCP 47 language priority list <var>requestedLocales</var> for which <var>availableLocales</var> has a matching locale when using the Best Fit Matcher algorithm. Locales appear in the same order in the returned list as in <var>requestedLocales</var>. The steps taken are implementation dependent.

      </p>
    </emu-clause>

    <emu-clause id="sec-supportedlocales" aoid="SupportedLocales">
      <h1><span class="secnum">9.2.9</span>SupportedLocales ( <var>availableLocales</var>, <var>requestedLocales</var>, <var>options</var> )</h1>

      <p>
        The SupportedLocales abstract operation returns the subset of the provided BCP 47 language priority list <var>requestedLocales</var> for which <var>availableLocales</var> has a matching locale. Two algorithms are available to match the locales: the Lookup algorithm described in RFC 4647 section 3.4, and an implementation dependent best-fit algorithm. Locales appear in the same order in the returned list as in <var>requestedLocales</var>. The following steps are taken:

      </p>

      <emu-alg><ol><li>If <var>options</var> is not <emu-val>undefined</emu-val>, then<ol><li>Let <var>options</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_159"><a href="https://tc39.github.io/ecma262/#sec-toobject">ToObject</a></emu-xref>(<var>options</var>).</li><li>Let <var>matcher</var> be ?&nbsp;<emu-xref aoid="GetOption" id="_ref_160"><a href="#sec-getoption">GetOption</a></emu-xref>(<var>options</var>, <code>"localeMatcher"</code>, <code>"string"</code>, « <code>"lookup"</code>, <code>"best fit"</code> », <code>"best fit"</code>).</li></ol></li><li>Else, let <var>matcher</var> be <code>"best fit"</code>.</li><li>If <var>matcher</var> is <code>"best fit"</code>, then<ol><li>Let <var>supportedLocales</var> be <emu-xref aoid="BestFitSupportedLocales" id="_ref_161"><a href="#sec-bestfitsupportedlocales">BestFitSupportedLocales</a></emu-xref>(<var>availableLocales</var>, <var>requestedLocales</var>).</li></ol></li><li>Else,<ol><li>Let <var>supportedLocales</var> be <emu-xref aoid="LookupSupportedLocales" id="_ref_162"><a href="#sec-lookupsupportedlocales">LookupSupportedLocales</a></emu-xref>(<var>availableLocales</var>, <var>requestedLocales</var>).</li></ol></li><li>Let <var>subset</var> be <emu-xref aoid="CreateArrayFromList" id="_ref_163"><a href="https://tc39.github.io/ecma262/#sec-createarrayfromlist">CreateArrayFromList</a></emu-xref>(<var>supportedLocales</var>).</li><li>Let <var>keys</var> be <var>subset</var>.[[OwnPropertyKeys]]().</li><li>For each element <var>P</var> of <var>keys</var> in <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">List</a></emu-xref> order, do<ol><li>Let <var>desc</var> be PropertyDescriptor { [[Configurable]]: <emu-val>false</emu-val>, [[Writable]]: <emu-val>false</emu-val> }.</li><li>Perform !&nbsp;<emu-xref aoid="DefinePropertyOrThrow" id="_ref_164"><a href="https://tc39.github.io/ecma262/#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>subset</var>, <var>P</var>, <var>desc</var>).</li></ol></li><li>Return <var>subset</var>.
      </li></ol></emu-alg>
    </emu-clause>

    <emu-clause id="sec-getoption" aoid="GetOption">
      <h1><span class="secnum">9.2.10</span>GetOption ( <var>options</var>, <var>property</var>, <var>type</var>, <var>values</var>, <var>fallback</var> )</h1>

      <p>
        The abstract operation GetOption extracts the value of the property named <var>property</var> from the provided <var>options</var> object, converts it to the required <var>type</var>, checks whether it is one of a <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">List</a></emu-xref> of allowed <var>values</var>, and fills in a <var>fallback</var> value if necessary. If <var>values</var> is <emu-val>undefined</emu-val>, there is no fixed set of values and any is permitted.

      </p>

      <emu-alg><ol><li>Let <var>value</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_165"><a href="https://tc39.github.io/ecma262/#sec-get-o-p">Get</a></emu-xref>(<var>options</var>, <var>property</var>).</li><li>If <var>value</var> is not <emu-val>undefined</emu-val>, then<ol><li>Assert: <var>type</var> is <code>"boolean"</code> or <code>"string"</code>.</li><li>If <var>type</var> is <code>"boolean"</code>, then<ol><li>Let <var>value</var> be <emu-xref aoid="ToBoolean" id="_ref_166"><a href="https://tc39.github.io/ecma262/#sec-toboolean">ToBoolean</a></emu-xref>(<var>value</var>).</li></ol></li><li>If <var>type</var> is <code>"string"</code>, then<ol><li>Let <var>value</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_167"><a href="https://tc39.github.io/ecma262/#sec-tostring">ToString</a></emu-xref>(<var>value</var>).</li></ol></li><li>If <var>values</var> is not <emu-val>undefined</emu-val>, then<ol><li>If <var>values</var> does not contain an element equal to <var>value</var>, throw a <emu-val>RangeError</emu-val> exception.</li></ol></li><li>Return <var>value</var>.</li></ol></li><li>Else, return <var>fallback</var>.
      </li></ol></emu-alg>
    </emu-clause>

    <emu-clause id="sec-defaultnumberoption" aoid="DefaultNumberOption">
      <h1><span class="secnum">9.2.11</span>DefaultNumberOption ( <var>value</var>, <var>minimum</var>, <var>maximum</var>, <var>fallback</var> )</h1>

      <p>
        The abstract operation DefaultNumberOption converts <var>value</var> to a Number value, checks whether it is in the allowed range, and fills in a <var>fallback</var> value if necessary.

      </p>

      <emu-alg><ol><li>If <var>value</var> is not <emu-val>undefined</emu-val>, then<ol><li>Let <var>value</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_168"><a href="https://tc39.github.io/ecma262/#sec-tonumber">ToNumber</a></emu-xref>(<var>value</var>).</li><li>If <var>value</var> is <emu-val>NaN</emu-val> or less than <var>minimum</var> or greater than <var>maximum</var>, throw a <emu-val>RangeError</emu-val> exception.</li><li>Return <emu-xref aoid="floor"><a href="https://tc39.github.io/ecma262/#sec-algorithm-conventions">floor</a></emu-xref>(<var>value</var>).</li></ol></li><li>Else, return <var>fallback</var>.
      </li></ol></emu-alg>
    </emu-clause>

    <emu-clause id="sec-getnumberoption" aoid="GetNumberOption">
      <h1><span class="secnum">9.2.12</span>GetNumberOption ( <var>options</var>, <var>property</var>, <var>minimum</var>, <var>maximum</var>, <var>fallback</var> )</h1>

      <p>
        The abstract operation GetNumberOption extracts the value of the property named <var>property</var> from the provided <var>options</var> object, converts it to a Number value, checks whether it is in the allowed range, and fills in a <var>fallback</var> value if necessary.

      </p>

      <emu-alg><ol><li>Let <var>value</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_169"><a href="https://tc39.github.io/ecma262/#sec-get-o-p">Get</a></emu-xref>(<var>options</var>, <var>property</var>).</li><li>Return ?&nbsp;<emu-xref aoid="DefaultNumberOption" id="_ref_170"><a href="#sec-defaultnumberoption">DefaultNumberOption</a></emu-xref>(<var>value</var>, <var>minimum</var>, <var>maximum</var>, <var>fallback</var>).
      </li></ol></emu-alg>
    </emu-clause>

  </emu-clause>
</emu-clause>
</emu-import>
<emu-import href="./collator.html"><emu-clause id="collator-objects">
  <h1><span class="secnum">10</span>Collator Objects</h1>

  <emu-clause id="sec-the-intl-collator-constructor">
    <h1><span class="secnum">10.1</span>The Intl.Collator Constructor</h1>
    <p>
      The Intl.Collator constructor is the  <dfn>%Collator%</dfn> intrinsic object and a standard built-in property of the Intl object. Behaviour common to all service constructor properties of the Intl object is specified in  <emu-xref href="#sec-internal-slots" id="_ref_30"><a href="#sec-internal-slots">9.1</a></emu-xref>.

    </p>

    <emu-clause id="sec-initializecollator" aoid="InitializeCollator">
      <h1><span class="secnum">10.1.1</span>InitializeCollator ( <var>collator</var>, <var>locales</var>, <var>options</var> )</h1>

      <p>
        The abstract operation InitializeCollator accepts the arguments <var>collator</var> (which must be an object), <var>locales</var>, and <var>options</var>. It initializes <var>collator</var> as a <emu-val>Collator</emu-val> object. The following steps are taken:

      </p>

      <emu-alg><ol><li>Let <var>requestedLocales</var> be ?&nbsp;<emu-xref aoid="CanonicalizeLocaleList" id="_ref_171"><a href="#sec-canonicalizelocalelist">CanonicalizeLocaleList</a></emu-xref>(<var>locales</var>).</li><li>If <var>options</var> is <emu-val>undefined</emu-val>, then<ol><li>Let <var>options</var> be <emu-xref aoid="ObjectCreate" id="_ref_172"><a href="https://tc39.github.io/ecma262/#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-val>null</emu-val>).</li></ol></li><li>Else,<ol><li>Let <var>options</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_173"><a href="https://tc39.github.io/ecma262/#sec-toobject">ToObject</a></emu-xref>(<var>options</var>).</li></ol></li><li>Let <var>usage</var> be ?&nbsp;<emu-xref aoid="GetOption" id="_ref_174"><a href="#sec-getoption">GetOption</a></emu-xref>(<var>options</var>, <code>"usage"</code>, <code>"string"</code>, « <code>"sort"</code>, <code>"search"</code> », <code>"sort"</code>).</li><li>Set <var>collator</var>.[[Usage]] to <var>usage</var>.</li><li>If <var>usage</var> is <code>"sort"</code>, then<ol><li>Let <var>localeData</var> be <emu-xref href="#sec-the-intl-collator-constructor" id="_ref_175"><a href="#sec-the-intl-collator-constructor">%Collator%</a></emu-xref>.[[SortLocaleData]].</li></ol></li><li>Else,<ol><li>Let <var>localeData</var> be <emu-xref href="#sec-the-intl-collator-constructor" id="_ref_176"><a href="#sec-the-intl-collator-constructor">%Collator%</a></emu-xref>.[[SearchLocaleData]].</li></ol></li><li>Let <var>opt</var> be a new <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref>.</li><li>Let <var>matcher</var> be ?&nbsp;<emu-xref aoid="GetOption" id="_ref_177"><a href="#sec-getoption">GetOption</a></emu-xref>(<var>options</var>, <code>"localeMatcher"</code>, <code>"string"</code>, « <code>"lookup"</code>, <code>"best fit"</code> », <code>"best fit"</code>).</li><li>Set <var>opt</var>.[[localeMatcher]] to <var>matcher</var>.</li><li>Let <var>numeric</var> be ?&nbsp;<emu-xref aoid="GetOption" id="_ref_178"><a href="#sec-getoption">GetOption</a></emu-xref>(<var>options</var>, <code>"numeric"</code>, <code>"boolean"</code>, <emu-val>undefined</emu-val>, <emu-val>undefined</emu-val>).</li><li>If <var>numeric</var> is not <emu-val>undefined</emu-val>, then<ol><li>Let <var>numeric</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_179"><a href="https://tc39.github.io/ecma262/#sec-tostring">ToString</a></emu-xref>(<var>numeric</var>).</li></ol></li><li>Set <var>opt</var>.[[kn]] to <var>numeric</var>.</li><li>Let <var>caseFirst</var> be ?&nbsp;<emu-xref aoid="GetOption" id="_ref_180"><a href="#sec-getoption">GetOption</a></emu-xref>(<var>options</var>, <code>"caseFirst"</code>, <code>"string"</code>, « <code>"upper"</code>, <code>"lower"</code>, <code>"false"</code> », <emu-val>undefined</emu-val>).</li><li>Set <var>opt</var>.[[kf]] to <var>caseFirst</var>.</li><li>Let <var>relevantExtensionKeys</var> be <emu-xref href="#sec-the-intl-collator-constructor" id="_ref_181"><a href="#sec-the-intl-collator-constructor">%Collator%</a></emu-xref>.[[RelevantExtensionKeys]].</li><li>Let <var>r</var> be <emu-xref aoid="ResolveLocale" id="_ref_182"><a href="#sec-resolvelocale">ResolveLocale</a></emu-xref>(<emu-xref href="#sec-the-intl-collator-constructor" id="_ref_183"><a href="#sec-the-intl-collator-constructor">%Collator%</a></emu-xref>.[[AvailableLocales]], <var>requestedLocales</var>, <var>opt</var>, <var>relevantExtensionKeys</var>, <var>localeData</var>).</li><li>Set <var>collator</var>.[[Locale]] to <var>r</var>.[[locale]].</li><li>Let <var>collation</var> be <var>r</var>.[[co]].</li><li>If <var>collation</var> is <emu-val>null</emu-val>, let <var>collation</var> be <code>"default"</code>.</li><li>Set <var>collator</var>.[[Collation]] to <var>collation</var>.</li><li>If <var>relevantExtensionKeys</var> contains <code>"kn"</code>, then<ol><li>Set <var>collator</var>.[[Numeric]] to !&nbsp;<emu-xref aoid="SameValue" id="_ref_184"><a href="https://tc39.github.io/ecma262/#sec-samevalue">SameValue</a></emu-xref>(<var>r</var>.[[kn]], <code>"true"</code>).</li></ol></li><li>If <var>relevantExtensionKeys</var> contains <code>"kf"</code>, then<ol><li>Set <var>collator</var>.[[CaseFirst]] to <var>r</var>.[[kf]].</li></ol></li><li>Let <var>sensitivity</var> be ?&nbsp;<emu-xref aoid="GetOption" id="_ref_185"><a href="#sec-getoption">GetOption</a></emu-xref>(<var>options</var>, <code>"sensitivity"</code>, <code>"string"</code>, « <code>"base"</code>, <code>"accent"</code>, <code>"case"</code>, <code>"variant"</code> », <emu-val>undefined</emu-val>).</li><li>If <var>sensitivity</var> is <emu-val>undefined</emu-val>, then<ol><li>If <var>usage</var> is <code>"sort"</code>, then<ol><li>Let <var>sensitivity</var> be <code>"variant"</code>.</li></ol></li><li>Else,<ol><li>Let <var>dataLocale</var> be <var>r</var>.[[dataLocale]].</li><li>Let <var>dataLocaleData</var> be <var>localeData</var>.[[&lt;<var>dataLocale</var>&gt;]].</li><li>Let <var>sensitivity</var> be <var>dataLocaleData</var>.[[sensitivity]].</li></ol></li></ol></li><li>Set <var>collator</var>.[[Sensitivity]] to <var>sensitivity</var>.</li><li>Let <var>ignorePunctuation</var> be ?&nbsp;<emu-xref aoid="GetOption" id="_ref_186"><a href="#sec-getoption">GetOption</a></emu-xref>(<var>options</var>, <code>"ignorePunctuation"</code>, <code>"boolean"</code>, <emu-val>undefined</emu-val>, <emu-val>false</emu-val>).</li><li>Set <var>collator</var>.[[IgnorePunctuation]] to <var>ignorePunctuation</var>.</li><li>Return <var>collator</var>.
      </li></ol></emu-alg>

    </emu-clause>

    <emu-clause id="sec-intl.collator">
      <h1><span class="secnum">10.1.2</span>Intl.Collator ( [ <var>locales</var> [ , <var>options</var> ] ] )</h1>

      <p>
        When the <code>Intl.Collator</code> function is called with optional arguments <var>locales</var> and <var>options</var>, the following steps are taken:

      </p>

      <emu-alg><ol><li>If NewTarget is <emu-val>undefined</emu-val>, let <var>newTarget</var> be the <emu-xref href="#active-function-object"><a href="https://tc39.github.io/ecma262/#active-function-object">active function object</a></emu-xref>, else let <var>newTarget</var> be NewTarget.</li><li>Let <var>internalSlotsList</var> be « [[InitializedCollator]], [[Locale]], [[Usage]], [[Sensitivity]], [[IgnorePunctuation]], [[Collation]], [[BoundCompare]] ».</li><li>If <emu-xref href="#sec-the-intl-collator-constructor" id="_ref_187"><a href="#sec-the-intl-collator-constructor">%Collator%</a></emu-xref>.[[RelevantExtensionKeys]] contains <code>"kn"</code>, then<ol><li>Append [[Numeric]] as the last element of <var>internalSlotsList</var>.</li></ol></li><li>If <emu-xref href="#sec-the-intl-collator-constructor" id="_ref_188"><a href="#sec-the-intl-collator-constructor">%Collator%</a></emu-xref>.[[RelevantExtensionKeys]] contains <code>"kf"</code>, then<ol><li>Append [[CaseFirst]] as the last element of <var>internalSlotsList</var>.</li></ol></li><li>Let <var>collator</var> be ?&nbsp;<emu-xref aoid="OrdinaryCreateFromConstructor" id="_ref_189"><a href="https://tc39.github.io/ecma262/#sec-ordinarycreatefromconstructor">OrdinaryCreateFromConstructor</a></emu-xref>(<var>newTarget</var>, <code>"%CollatorPrototype%"</code>, <var>internalSlotsList</var>).</li><li>Return ?&nbsp;<emu-xref aoid="InitializeCollator" id="_ref_190"><a href="#sec-initializecollator">InitializeCollator</a></emu-xref>(<var>collator</var>, <var>locales</var>, <var>options</var>).
      </li></ol></emu-alg>
    </emu-clause>
  </emu-clause>

  <emu-clause id="sec-properties-of-the-intl-collator-constructor">
    <h1><span class="secnum">10.2</span>Properties of the Intl.Collator Constructor</h1>

    <p>
      The Intl.Collator constructor has the following properties:

    </p>

    <emu-clause id="sec-intl.collator.prototype">
      <h1><span class="secnum">10.2.1</span>Intl.Collator.prototype</h1>

      <p>
        The value of <code>Intl.Collator.prototype</code> is <emu-xref href="#sec-properties-of-the-intl-collator-prototype-object" id="_ref_191"><a href="#sec-properties-of-the-intl-collator-prototype-object">%CollatorPrototype%</a></emu-xref>.

      </p>

      <p>
        This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.

      </p>
    </emu-clause>

    <emu-clause id="sec-intl.collator.supportedlocalesof">
      <h1><span class="secnum">10.2.2</span>Intl.Collator.supportedLocalesOf ( <var>locales</var> [ , <var>options</var> ] )</h1>

      <p>
        When the <code>supportedLocalesOf</code> method is called, the following steps are taken:

      </p>

      <emu-alg><ol><li>Let <var>availableLocales</var> be <emu-xref href="#sec-the-intl-collator-constructor" id="_ref_192"><a href="#sec-the-intl-collator-constructor">%Collator%</a></emu-xref>.[[AvailableLocales]].</li><li>Let <var>requestedLocales</var> be ?&nbsp;<emu-xref aoid="CanonicalizeLocaleList" id="_ref_193"><a href="#sec-canonicalizelocalelist">CanonicalizeLocaleList</a></emu-xref>(<var>locales</var>).</li><li>Return ?&nbsp;<emu-xref aoid="SupportedLocales" id="_ref_194"><a href="#sec-supportedlocales">SupportedLocales</a></emu-xref>(<var>availableLocales</var>, <var>requestedLocales</var>, <var>options</var>).
      </li></ol></emu-alg>

      <p>
        The value of the <code>length</code> property of the <emu-val>supportedLocalesOf</emu-val> method is 1.

      </p>
    </emu-clause>

    <emu-clause id="sec-intl-collator-internal-slots">
      <h1><span class="secnum">10.2.3</span>Internal Slots</h1>

      <p>
        The value of the [[AvailableLocales]] internal slot is implementation defined within the constraints described in  <emu-xref href="#sec-internal-slots" id="_ref_31"><a href="#sec-internal-slots">9.1</a></emu-xref>. The value of the [[RelevantExtensionKeys]] internal slot is a <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">List</a></emu-xref> that must include the element <code>"co"</code>, may include any or all of the elements <code>"kn"</code> and <code>"kf"</code>, and must not include any other elements.

      </p>

      <emu-note><span class="note">Note</span><div class="note-contents">
        Unicode Technical Standard 35 describes ten locale extension keys that are relevant to collation: <code>"co"</code> for collator usage and specializations, <code>"ka"</code> for alternate handling, <code>"kb"</code> for backward second level weight, <code>"kc"</code> for case level, <code>"kn"</code> for numeric, <code>"kh"</code> for hiragana quaternary, <code>"kk"</code> for normalization, <code>"kf"</code> for case first, <code>"kr"</code> for reordering, <code>"ks"</code> for collation strength, and <code>"vt"</code> for variable top. Collator, however, requires that the usage is specified through the usage property of the options object, alternate handling through the ignorePunctuation property of the options object, and case level and the strength through the sensitivity property of the options object. The <code>"co"</code> key in the language tag is supported only for collator specializations, and the keys <code>"kb"</code>, <code>"kh"</code>, <code>"kk"</code>, <code>"kr"</code>, and <code>"vt"</code> are not allowed in this version of the Internationalization API. Support for the remaining keys is implementation dependent.

      </div></emu-note>

      <p>
        The values of the [[SortLocaleData]] and [[SearchLocaleData]] internal slots are implementation defined within the constraints described in  <emu-xref href="#sec-internal-slots" id="_ref_32"><a href="#sec-internal-slots">9.1</a></emu-xref> and the following additional constraints:

      </p>

      <ul>
        <li>The first element of [[SortLocaleData]][locale].co and [[SearchLocaleData]][locale].co must be <emu-val>null</emu-val> for all locale values.</li>
        <li>The values <code>"standard"</code> and <code>"search"</code> must not be used as elements in any [[SortLocaleData]][locale].co and [[SearchLocaleData]][locale].co list.</li>
        <li>[[SearchLocaleData]][locale] must have a sensitivity field with a String value equal to <code>"base"</code>, <code>"accent"</code>, <code>"case"</code>, or <code>"variant"</code> for all locale values.</li>
      </ul>

    </emu-clause>
  </emu-clause>

  <emu-clause id="sec-properties-of-the-intl-collator-prototype-object">
    <h1><span class="secnum">10.3</span>Properties of the Intl.Collator Prototype Object</h1>

    <p>
      The Intl.Collator prototype object is itself an ordinary object.  <dfn>%CollatorPrototype%</dfn> is not an Intl.Collator instance and does not have an [[InitializedCollator]] internal slot or any of the other internal slots of Intl.Collator instance objects.

    </p>

    <emu-clause id="sec-intl.collator.prototype.constructor">
      <h1><span class="secnum">10.3.1</span>Intl.Collator.prototype.constructor</h1>

      <p>
        The initial value of <code>Intl.Collator.prototype.constructor</code> is the intrinsic object <emu-xref href="#sec-the-intl-collator-constructor" id="_ref_195"><a href="#sec-the-intl-collator-constructor">%Collator%</a></emu-xref>.

      </p>
    </emu-clause>

    <emu-clause id="sec-intl.collator.prototype-@@tostringtag">
      <h1><span class="secnum">10.3.2</span>Intl.Collator.prototype [ @@toStringTag ]</h1>

      <p>
        The initial value of the @@toStringTag property is the string value <code>"Object"</code>.

      </p>

      <p>
        This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.

      </p>
    </emu-clause>

    <emu-clause id="sec-intl.collator.prototype.compare">
      <h1><span class="secnum">10.3.3</span>get Intl.Collator.prototype.compare</h1>

      <p>
        This named accessor property returns a function that compares two strings according to the sort order of this Collator object.

      </p>
      <p>
        Intl.Collator.prototype.compare is an accessor property whose set accessor function is <emu-val>undefined</emu-val>. Its get accessor function performs the following steps:

      </p>

      <emu-alg><ol><li>Let <var>collator</var> be <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_196"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>collator</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>collator</var> does not have an [[InitializedCollator]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>collator</var>.[[BoundCompare]] is <emu-val>undefined</emu-val>, then<ol><li>Let <var>F</var> be a new built-in function object as defined in <emu-xref href="#sec-collator-compare-functions" id="_ref_33"><a href="#sec-collator-compare-functions">10.3.3.1</a></emu-xref>.</li><li>Set <var>F</var>.[[Collator]] to <var>collator</var>.</li><li>Set <var>collator</var>.[[BoundCompare]] to <var>F</var>.</li></ol></li><li>Return <var>collator</var>.[[BoundCompare]].
      </li></ol></emu-alg>

      <emu-note><span class="note">Note</span><div class="note-contents">
        The returned function is bound to <var>collator</var> so that it can be passed directly to <code>Array.prototype.sort</code> or other functions.

      </div></emu-note>

      <emu-clause id="sec-collator-compare-functions">
        <h1><span class="secnum">10.3.3.1</span>Collator Compare Functions</h1>

        <p>A Collator compare function is an anonymous built-in function that has a [[Collator]] internal slot.</p>
        <p>When a Collator compare function <var>F</var> is called with arguments <var>x</var> and <var>y</var>, the following steps are taken:</p>

        <emu-alg><ol><li>Let <var>collator</var> be <var>F</var>.[[Collator]].</li><li>Assert: <emu-xref aoid="Type" id="_ref_197"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>collator</var>) is Object and <var>collator</var> has an [[InitializedCollator]] internal slot.</li><li>If <var>x</var> is not provided, let <var>x</var> be <emu-val>undefined</emu-val>.</li><li>If <var>y</var> is not provided, let <var>y</var> be <emu-val>undefined</emu-val>.</li><li>Let <var>X</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_198"><a href="https://tc39.github.io/ecma262/#sec-tostring">ToString</a></emu-xref>(<var>x</var>).</li><li>Let <var>Y</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_199"><a href="https://tc39.github.io/ecma262/#sec-tostring">ToString</a></emu-xref>(<var>y</var>).</li><li>Return <emu-xref aoid="CompareStrings" id="_ref_200"><a href="#sec-collator-comparestrings">CompareStrings</a></emu-xref>(<var>collator</var>, <var>X</var>, <var>Y</var>).
        </li></ol></emu-alg>

        <p>The <code>length</code> property of a Collator compare function is 2.</p>
      </emu-clause>

      <emu-clause id="sec-collator-comparestrings" aoid="CompareStrings">
        <h1><span class="secnum">10.3.3.2</span>CompareStrings ( <var>collator</var>, <var>x</var>, <var>y</var> )</h1>

        <p>
          When the CompareStrings abstract operation is called with arguments <var>collator</var> (which must be an object initialized as a Collator), <var>x</var> and <var>y</var> (which must be String values), it returns a Number other than <emu-val>NaN</emu-val> that represents the result of a locale-sensitive String comparison of <var>x</var> with <var>y</var>. The two Strings are compared in an implementation-defined fashion. The result is intended to order String values in the sort order specified by the effective locale and collation options computed during construction of <var>collator</var>, and will be negative, zero, or positive, depending on whether <var>x</var> comes before <var>y</var> in the sort order, the Strings are equal under the sort order, or <var>x</var> comes after <var>y</var> in the sort order, respectively. String values must be interpreted as UTF-16 code unit sequences, and a surrogate pair (a code unit in the range 0xD800 to 0xDBFF followed by a code unit in the range 0xDC00 to 0xDFFF) within a string must be interpreted as the corresponding code point.

        </p>

        <p>
          The sensitivity of <var>collator</var> is interpreted as follows:

        </p>

        <ul>
          <li>base: Only strings that differ in base letters compare as unequal. Examples: a ≠ b, a = á, a = A.</li>
          <li>accent: Only strings that differ in base letters or accents and other diacritic marks compare as unequal. Examples: a ≠ b, a ≠ á, a = A.</li>
          <li>case: Only strings that differ in base letters or case compare as unequal. Examples: a ≠ b, a = á, a ≠ A.</li>
          <li>variant: Strings that differ in base letters, accents and other diacritic marks, or case compare as unequal. Other differences may also be taken into consideration. Examples: a ≠ b, a ≠ á, a ≠ A.</li>
        </ul>

        <emu-note><span class="note">Note 1</span><div class="note-contents">
        In some languages, certain letters with diacritic marks are considered base letters. For example, in Swedish, "ö" is a base letter that's different from "o".

        </div></emu-note>

        <p>
          If the collator is set to ignore punctuation, then strings that differ only in punctuation compare as equal.

        </p>

        <p>
          For the interpretation of options settable through extension keys, see Unicode Technical Standard 35.

        </p>

        <p>
          The CompareStrings abstract operation with any given <var>collator</var> argument, if considered as a function of the remaining two arguments <var>x</var> and <var>y</var>, must be a consistent comparison function (as defined in ES2019,  <emu-xref href="#sec-array.prototype.sort"><a href="https://tc39.github.io/ecma262/#sec-array.prototype.sort">22.1.3.25</a></emu-xref>) on the set of all Strings.

        </p>

        <p>
          The actual return values are implementation-defined to permit implementers to encode additional information in the value. The method is required to return <emu-val>+0</emu-val> when comparing Strings that are considered canonically equivalent by the Unicode standard.

        </p>

        <emu-note><span class="note">Note 2</span><div class="note-contents">
          It is recommended that the CompareStrings abstract operation be implemented following Unicode Technical Standard 10, Unicode Collation Algorithm (available at  <a href="https://unicode.org/reports/tr10/">https://unicode.org/reports/tr10/</a>), using tailorings for the effective locale and collation options of <var>collator</var>. It is recommended that implementations use the tailorings provided by the Common Locale Data Repository (available at  <a href="http://cldr.unicode.org/">http://cldr.unicode.org/</a>).

        </div></emu-note>

        <emu-note><span class="note">Note 3</span><div class="note-contents">
          Applications should not assume that the behaviour of the CompareStrings abstract operation for Collator instances with the same resolved options will remain the same for different versions of the same implementation.

        </div></emu-note>

      </emu-clause>
    </emu-clause>

    <emu-clause id="sec-intl.collator.prototype.resolvedoptions">
      <h1><span class="secnum">10.3.4</span>Intl.Collator.prototype.resolvedOptions ()</h1>

      <p>
        This function provides access to the locale and collation options computed during initialization of the object.

      </p>

      <emu-alg><ol><li>Let <var>collator</var> be <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_201"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>collator</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>collator</var> does not have an [[InitializedCollator]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>options</var> be !&nbsp;<emu-xref aoid="ObjectCreate" id="_ref_202"><a href="https://tc39.github.io/ecma262/#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-xref href="#sec-properties-of-the-object-prototype-object"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>).</li><li>For each row of <emu-xref href="#table-collator-resolvedoptions-properties" id="_ref_34"><a href="#table-collator-resolvedoptions-properties">Table 2</a></emu-xref>, except the header row, in table order, do<ol><li>Let <var>p</var> be the Property value of the current row.</li><li>Let <var>v</var> be the value of <var>collator</var>'s internal slot whose name is the Internal Slot value of the current row.</li><li>If the current row has an Extension Key value, then<ol><li>Let <var>extensionKey</var> be the Extension Key value of the current row.</li><li>If <emu-xref href="#sec-the-intl-collator-constructor" id="_ref_203"><a href="#sec-the-intl-collator-constructor">%Collator%</a></emu-xref>.[[RelevantExtensionKeys]] does not contain <var>extensionKey</var>, then<ol><li>Let <var>v</var> be <emu-val>undefined</emu-val>.</li></ol></li></ol></li><li>If <var>v</var> is not <emu-val>undefined</emu-val>, then<ol><li>Perform !&nbsp;<emu-xref aoid="CreateDataPropertyOrThrow" id="_ref_204"><a href="https://tc39.github.io/ecma262/#sec-createdatapropertyorthrow">CreateDataPropertyOrThrow</a></emu-xref>(<var>options</var>, <var>p</var>, <var>v</var>).</li></ol></li></ol></li><li>Return <var>options</var>.
      </li></ol></emu-alg>

      <emu-table id="table-collator-resolvedoptions-properties"><figure><figcaption>Table 2: Resolved Options of Collator Instances</figcaption>

        <table class="real-table">
          <thead>
            <tr>
              <th>Internal Slot</th>
              <th>Property</th>
              <th>Extension Key</th>
            </tr>
          </thead>
          <tbody><tr>
            <td>[[Locale]]</td>
            <td><code>"locale"</code></td>
            <td></td>
          </tr>
          <tr>
            <td>[[Usage]]</td>
            <td><code>"usage"</code></td>
            <td></td>
          </tr>
          <tr>
            <td>[[Sensitivity]]</td>
            <td><code>"sensitivity"</code></td>
            <td></td>
          </tr>
          <tr>
            <td>[[IgnorePunctuation]]</td>
            <td><code>"ignorePunctuation"</code></td>
            <td></td>
          </tr>
          <tr>
            <td>[[Collation]]</td>
            <td><code>"collation"</code></td>
            <td></td>
          </tr>
          <tr>
            <td>[[Numeric]]</td>
            <td><code>"numeric"</code></td>
            <td>kn</td>
          </tr>
          <tr>
            <td>[[CaseFirst]]</td>
            <td><code>"caseFirst"</code></td>
            <td>kf</td>
          </tr>
        </tbody></table>
      </figure></emu-table>
    </emu-clause>
  </emu-clause>

  <emu-clause id="sec-properties-of-intl-collator-instances">
    <h1><span class="secnum">10.4</span>Properties of Intl.Collator Instances</h1>

    <p>
      Intl.Collator instances are ordinary objects that inherit properties from <emu-xref href="#sec-properties-of-the-intl-collator-prototype-object" id="_ref_205"><a href="#sec-properties-of-the-intl-collator-prototype-object">%CollatorPrototype%</a></emu-xref>.

    </p>

    <p>
      Intl.Collator instances have an [[InitializedCollator]] internal slot.

    </p>

    <p>
      Intl.Collator instances also have several internal slots that are computed by the constructor:

    </p>

    <ul>
      <li>[[Locale]] is a String value with the language tag of the locale whose localization is used for collation.</li>
      <li>[[Usage]] is one of the String values <code>"sort"</code> or <code>"search"</code>, identifying the collator usage.</li>
      <li>[[Sensitivity]] is one of the String values <code>"base"</code>, <code>"accent"</code>, <code>"case"</code>, or <code>"variant"</code>, identifying the collator's sensitivity.</li>
      <li>[[IgnorePunctuation]] is a Boolean value, specifying whether punctuation should be ignored in comparisons.</li>
      <li>[[Collation]] is a String value with the <code>"type"</code> given in Unicode Technical Standard 35 for the collation, except that the values <code>"standard"</code> and <code>"search"</code> are not allowed, while the value <code>"default"</code> is allowed.</li>
    </ul>

    <p>
      Intl.Collator instances also have the following internal slots if the key corresponding to the name of the internal slot in  <emu-xref href="#table-collator-resolvedoptions-properties" id="_ref_35"><a href="#table-collator-resolvedoptions-properties">Table 2</a></emu-xref> is included in the [[RelevantExtensionKeys]] internal slot of Intl.Collator:

    </p>

    <ul>
      <li>[[Numeric]] is a Boolean value, specifying whether numeric sorting is used.</li>
      <li>[[CaseFirst]] is one of the String values <code>"upper"</code>, <code>"lower"</code>, or <code>"false"</code>.</li>
    </ul>

    <p>
      Finally, Intl.Collator instances have a [[BoundCompare]] internal slot that caches the function returned by the compare accessor (<emu-xref href="#sec-intl.collator.prototype.compare" id="_ref_36"><a href="#sec-intl.collator.prototype.compare">10.3.3</a></emu-xref>).

    </p>

  </emu-clause>
</emu-clause>
</emu-import>
<emu-import href="./numberformat.html"><emu-clause id="numberformat-objects">
  <h1><span class="secnum">11</span>NumberFormat Objects</h1>

  <emu-clause id="sec-numberformat-abstracts">
    <h1><span class="secnum">11.1</span>Abstract Operations For NumberFormat Objects</h1>

    <emu-clause id="sec-setnfdigitoptions" aoid="SetNumberFormatDigitOptions">
      <h1><span class="secnum">11.1.1</span>SetNumberFormatDigitOptions ( <var>intlObj</var>, <var>options</var>, <var>mnfdDefault</var>, <var>mxfdDefault</var> )</h1>

      <p>
        The abstract operation SetNumberFormatDigitOptions applies digit
        options used for number formatting onto the intl object.

      </p>
      <emu-alg><ol><li>Assert: <emu-xref aoid="Type" id="_ref_206"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>intlObj</var>) is Object.</li><li>Assert: <emu-xref aoid="Type" id="_ref_207"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>options</var>) is Object.</li><li>Assert: <emu-xref aoid="Type" id="_ref_208"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>mnfdDefault</var>) is Number.</li><li>Assert: <emu-xref aoid="Type" id="_ref_209"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>mxfdDefault</var>) is Number.</li><li>Let <var>mnid</var> be ?&nbsp;<emu-xref aoid="GetNumberOption" id="_ref_210"><a href="#sec-getnumberoption">GetNumberOption</a></emu-xref>(<var>options</var>, <code>"minimumIntegerDigits"</code>, 1, 21, 1).</li><li>Let <var>mnfd</var> be ?&nbsp;<emu-xref aoid="GetNumberOption" id="_ref_211"><a href="#sec-getnumberoption">GetNumberOption</a></emu-xref>(<var>options</var>, <code>"minimumFractionDigits"</code>, 0, 20, <var>mnfdDefault</var>).</li><li>Let <var>mxfdActualDefault</var> be <emu-xref aoid="max"><a href="https://tc39.github.io/ecma262/#sec-algorithm-conventions">max</a></emu-xref>( <var>mnfd</var>, <var>mxfdDefault</var> ).</li><li>Let <var>mxfd</var> be ?&nbsp;<emu-xref aoid="GetNumberOption" id="_ref_212"><a href="#sec-getnumberoption">GetNumberOption</a></emu-xref>(<var>options</var>, <code>"maximumFractionDigits"</code>, <var>mnfd</var>, 20, <var>mxfdActualDefault</var>).</li><li>Let <var>mnsd</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_213"><a href="https://tc39.github.io/ecma262/#sec-get-o-p">Get</a></emu-xref>(<var>options</var>, <code>"minimumSignificantDigits"</code>).</li><li>Let <var>mxsd</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_214"><a href="https://tc39.github.io/ecma262/#sec-get-o-p">Get</a></emu-xref>(<var>options</var>, <code>"maximumSignificantDigits"</code>).</li><li>Set <var>intlObj</var>.[[MinimumIntegerDigits]] to <var>mnid</var>.</li><li>Set <var>intlObj</var>.[[MinimumFractionDigits]] to <var>mnfd</var>.</li><li>Set <var>intlObj</var>.[[MaximumFractionDigits]] to <var>mxfd</var>.</li><li>If <var>mnsd</var> is not <emu-val>undefined</emu-val> or <var>mxsd</var> is not <emu-val>undefined</emu-val>, then<ol><li>Let <var>mnsd</var> be ?&nbsp;<emu-xref aoid="DefaultNumberOption" id="_ref_215"><a href="#sec-defaultnumberoption">DefaultNumberOption</a></emu-xref>(<var>mnsd</var>, 1, 21, 1).</li><li>Let <var>mxsd</var> be ?&nbsp;<emu-xref aoid="DefaultNumberOption" id="_ref_216"><a href="#sec-defaultnumberoption">DefaultNumberOption</a></emu-xref>(<var>mxsd</var>, <var>mnsd</var>, 21, 21).</li><li>Set <var>intlObj</var>.[[MinimumSignificantDigits]] to <var>mnsd</var>.</li><li>Set <var>intlObj</var>.[[MaximumSignificantDigits]] to <var>mxsd</var>.
      </li></ol></li></ol></emu-alg>
    </emu-clause>

    <emu-clause id="sec-initializenumberformat" aoid="InitializeNumberFormat">
      <h1><span class="secnum">11.1.2</span>InitializeNumberFormat ( <var>numberFormat</var>, <var>locales</var>, <var>options</var> )</h1>

      <p>
        The abstract operation InitializeNumberFormat accepts the arguments <var>numberFormat</var> (which must be an object), <var>locales</var>, and <var>options</var>. It initializes <var>numberFormat</var> as a NumberFormat object. The following steps are taken:

      </p>

      <emu-alg><ol><li>Let <var>requestedLocales</var> be ?&nbsp;<emu-xref aoid="CanonicalizeLocaleList" id="_ref_217"><a href="#sec-canonicalizelocalelist">CanonicalizeLocaleList</a></emu-xref>(<var>locales</var>).</li><li>If <var>options</var> is <emu-val>undefined</emu-val>, then<ol><li>Let <var>options</var> be <emu-xref aoid="ObjectCreate" id="_ref_218"><a href="https://tc39.github.io/ecma262/#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-val>null</emu-val>).</li></ol></li><li>Else,<ol><li>Let <var>options</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_219"><a href="https://tc39.github.io/ecma262/#sec-toobject">ToObject</a></emu-xref>(<var>options</var>).</li></ol></li><li>Let <var>opt</var> be a new <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref>.</li><li>Let <var>matcher</var> be ?&nbsp;<emu-xref aoid="GetOption" id="_ref_220"><a href="#sec-getoption">GetOption</a></emu-xref>(<var>options</var>, <code>"localeMatcher"</code>, <code>"string"</code>, « <code>"lookup"</code>, <code>"best fit"</code> », <code>"best fit"</code>).</li><li>Set <var>opt</var>.[[localeMatcher]] to <var>matcher</var>.</li><li>Let <var>localeData</var> be <emu-xref href="#sec-intl-numberformat-constructor" id="_ref_221"><a href="#sec-intl-numberformat-constructor">%NumberFormat%</a></emu-xref>.[[LocaleData]].</li><li>Let <var>r</var> be <emu-xref aoid="ResolveLocale" id="_ref_222"><a href="#sec-resolvelocale">ResolveLocale</a></emu-xref>(<emu-xref href="#sec-intl-numberformat-constructor" id="_ref_223"><a href="#sec-intl-numberformat-constructor">%NumberFormat%</a></emu-xref>.[[AvailableLocales]], <var>requestedLocales</var>, <var>opt</var>, <emu-xref href="#sec-intl-numberformat-constructor" id="_ref_224"><a href="#sec-intl-numberformat-constructor">%NumberFormat%</a></emu-xref>.[[RelevantExtensionKeys]], <var>localeData</var>).</li><li>Set <var>numberFormat</var>.[[Locale]] to <var>r</var>.[[locale]].</li><li>Set <var>numberFormat</var>.[[NumberingSystem]] to <var>r</var>.[[nu]].</li><li>Let <var>dataLocale</var> be <var>r</var>.[[dataLocale]].</li><li>Let <var>style</var> be ?&nbsp;<emu-xref aoid="GetOption" id="_ref_225"><a href="#sec-getoption">GetOption</a></emu-xref>(<var>options</var>, <code>"style"</code>, <code>"string"</code>, « <code>"decimal"</code>, <code>"percent"</code>, <code>"currency"</code> », <code>"decimal"</code>).</li><li>Set <var>numberFormat</var>.[[Style]] to <var>style</var>.</li><li>Let <var>currency</var> be ?&nbsp;<emu-xref aoid="GetOption" id="_ref_226"><a href="#sec-getoption">GetOption</a></emu-xref>(<var>options</var>, <code>"currency"</code>, <code>"string"</code>, <emu-val>undefined</emu-val>, <emu-val>undefined</emu-val>).</li><li>If <var>currency</var> is not <emu-val>undefined</emu-val>, then<ol><li>If the result of <emu-xref aoid="IsWellFormedCurrencyCode" id="_ref_227"><a href="#sec-iswellformedcurrencycode">IsWellFormedCurrencyCode</a></emu-xref>(<var>currency</var>) is <emu-val>false</emu-val>, throw a <emu-val>RangeError</emu-val> exception.</li></ol></li><li>If <var>style</var> is <code>"currency"</code> and <var>currency</var> is <emu-val>undefined</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>style</var> is <code>"currency"</code>, then<ol><li>Let <var>currency</var> be the result of converting <var>currency</var> to upper case as specified in <emu-xref href="#sec-case-sensitivity-and-case-mapping" id="_ref_37"><a href="#sec-case-sensitivity-and-case-mapping">6.1</a></emu-xref>.</li><li>Set <var>numberFormat</var>.[[Currency]] to <var>currency</var>.</li><li>Let <var>cDigits</var> be <emu-xref aoid="CurrencyDigits" id="_ref_228"><a href="#sec-currencydigits">CurrencyDigits</a></emu-xref>(<var>currency</var>).</li></ol></li><li>Let <var>currencyDisplay</var> be ?&nbsp;<emu-xref aoid="GetOption" id="_ref_229"><a href="#sec-getoption">GetOption</a></emu-xref>(<var>options</var>, <code>"currencyDisplay"</code>, <code>"string"</code>, « <code>"code"</code>, <code>"symbol"</code>, <code>"name"</code> », <code>"symbol"</code>).</li><li>If <var>style</var> is <code>"currency"</code>, set <var>numberFormat</var>.[[CurrencyDisplay]] to <var>currencyDisplay</var>.</li><li>If <var>style</var> is <code>"currency"</code>, then<ol><li>Let <var>mnfdDefault</var> be <var>cDigits</var>.</li><li>Let <var>mxfdDefault</var> be <var>cDigits</var>.</li></ol></li><li>Else,<ol><li>Let <var>mnfdDefault</var> be 0.</li><li>If <var>style</var> is <code>"percent"</code>, then<ol><li>Let <var>mxfdDefault</var> be 0.</li></ol></li><li>Else,<ol><li>Let <var>mxfdDefault</var> be 3.</li></ol></li></ol></li><li>Perform ?&nbsp;<emu-xref aoid="SetNumberFormatDigitOptions" id="_ref_230"><a href="#sec-setnfdigitoptions">SetNumberFormatDigitOptions</a></emu-xref>(<var>numberFormat</var>, <var>options</var>, <var>mnfdDefault</var>, <var>mxfdDefault</var>).</li><li>Let <var>useGrouping</var> be ?&nbsp;<emu-xref aoid="GetOption" id="_ref_231"><a href="#sec-getoption">GetOption</a></emu-xref>(<var>options</var>, <code>"useGrouping"</code>, <code>"boolean"</code>, <emu-val>undefined</emu-val>, <emu-val>true</emu-val>).</li><li>Set <var>numberFormat</var>.[[UseGrouping]] to <var>useGrouping</var>.</li><li>Let <var>dataLocaleData</var> be <var>localeData</var>.[[&lt;<var>dataLocale</var>&gt;]].</li><li>Let <var>patterns</var> be <var>dataLocaleData</var>.[[patterns]].</li><li>Assert: <var>patterns</var> is a record (see <emu-xref href="#sec-intl.numberformat-internal-slots" id="_ref_38"><a href="#sec-intl.numberformat-internal-slots">11.3.3</a></emu-xref>).</li><li>Let <var>stylePatterns</var> be <var>patterns</var>.[[&lt;<var>style</var>&gt;]].</li><li>Set <var>numberFormat</var>.[[PositivePattern]] to <var>stylePatterns</var>.[[positivePattern]].</li><li>Set <var>numberFormat</var>.[[NegativePattern]] to <var>stylePatterns</var>.[[negativePattern]].</li><li>Return <var>numberFormat</var>.
      </li></ol></emu-alg>
    </emu-clause>

    <emu-clause id="sec-currencydigits" aoid="CurrencyDigits">
      <h1><span class="secnum">11.1.3</span>CurrencyDigits ( <var>currency</var> )</h1>

      <p>
        When the abstract operation CurrencyDigits is called with an argument <var>currency</var> (which must be an upper case String value), the following steps are taken:

      </p>

      <emu-alg><ol><li>If the ISO 4217 currency and funds code list contains <var>currency</var> as an alphabetic code, return the minor unit value corresponding to the <var>currency</var> from the list; otherwise, return 2.
      </li></ol></emu-alg>
    </emu-clause>

    <emu-clause id="sec-number-format-functions">
      <h1><span class="secnum">11.1.4</span>Number Format Functions</h1>

      <p>A Number format function is an anonymous built-in function that has a [[NumberFormat]] internal slot.</p>
      <p>When a Number format function <var>F</var> is called with optional argument <var>value</var>, the following steps are taken:</p>

      <emu-alg><ol><li>Let <var>nf</var> be <var>F</var>.[[NumberFormat]].</li><li>Assert: <emu-xref aoid="Type" id="_ref_232"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>nf</var>) is Object and <var>nf</var> has an [[InitializedNumberFormat]] internal slot.</li><li>If <var>value</var> is not provided, let <var>value</var> be <emu-val>undefined</emu-val>.</li><li>Let <var>x</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_233"><a href="https://tc39.github.io/ecma262/#sec-tonumber">ToNumber</a></emu-xref>(<var>value</var>).</li><li>Return <emu-xref aoid="FormatNumber" id="_ref_234"><a href="#sec-formatnumber">FormatNumber</a></emu-xref>(<var>nf</var>, <var>x</var>).
      </li></ol></emu-alg>

      <p>
        The <code>length</code> property of a Number format function is 1.

      </p>
    </emu-clause>

    <emu-clause id="sec-formatnumberstring" aoid="FormatNumberToString">
      <h1><span class="secnum">11.1.5</span>FormatNumberToString ( <var>intlObject</var>, <var>x</var> )</h1>

      <p>
        The FormatNumberToString abstract operation is called with arguments <var>intlObject</var> (which must be an object with [[MinimumSignificantDigits]], [[MaximumSignificantDigits]], [[MinimumIntegerDigits]], [[MinimumFractionDigits]], and [[MaximumFractionDigits]] internal slots), and <var>x</var> (which must be a Number value), and returns <var>x</var> as a string value with digits formatted according to the five formatting parameters.

      </p>

      <emu-alg><ol><li>If <var>intlObject</var>.[[MinimumSignificantDigits]] and <var>intlObject</var>.[[MaximumSignificantDigits]] are both not <emu-val>undefined</emu-val>, then<ol><li>Let <var>result</var> be <emu-xref aoid="ToRawPrecision" id="_ref_235"><a href="#sec-torawprecision">ToRawPrecision</a></emu-xref>(<var>x</var>, <var>intlObject</var>.[[MinimumSignificantDigits]], <var>intlObject</var>.[[MaximumSignificantDigits]]).</li></ol></li><li>Else,<ol><li>Let <var>result</var> be <emu-xref aoid="ToRawFixed" id="_ref_236"><a href="#sec-torawfixed">ToRawFixed</a></emu-xref>(<var>x</var>, <var>intlObject</var>.[[MinimumIntegerDigits]], <var>intlObject</var>.[[MinimumFractionDigits]], <var>intlObject</var>.[[MaximumFractionDigits]]).</li></ol></li><li>Return <var>result</var>.
      </li></ol></emu-alg>
    </emu-clause>

    <emu-clause id="sec-partitionnumberpattern" aoid="PartitionNumberPattern">
      <h1><span class="secnum">11.1.6</span>PartitionNumberPattern ( <var>numberFormat</var>, <var>x</var> )</h1>

      <p>
        The PartitionNumberPattern abstract operation is called with arguments <var>numberFormat</var> (which must be an object initialized as a NumberFormat) and <var>x</var> (which must be a Number value), interprets <var>x</var> as a numeric value, and creates the corresponding parts according to the effective locale and the formatting options of <var>numberFormat</var>. The following steps are taken:

      </p>

      <emu-alg><ol><li>If <var>x</var> is not <emu-val>NaN</emu-val> and <var>x</var> &lt; 0 or <var>x</var> is <emu-val>-0</emu-val>, then<ol><li>Let <var>x</var> be -<var>x</var>.</li><li>Let <var>pattern</var> be <var>numberFormat</var>.[[NegativePattern]].</li></ol></li><li>Else,<ol><li>Let <var>pattern</var> be <var>numberFormat</var>.[[PositivePattern]].</li></ol></li><li>Let <var>result</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Let <var>beginIndex</var> be <emu-xref aoid="Call" id="_ref_237"><a href="https://tc39.github.io/ecma262/#sec-call">Call</a></emu-xref>(<emu-xref href="#sec-402-well-known-intrinsic-objects" id="_ref_238"><a href="#sec-402-well-known-intrinsic-objects">%StringProto_indexOf%</a></emu-xref>, <var>pattern</var>, « <code>"{"</code>, 0 »).</li><li>Let <var>endIndex</var> be 0.</li><li>Let <var>nextIndex</var> be 0.</li><li>Let <var>length</var> be the number of code units in <var>pattern</var>.</li><li>Repeat, while <var>beginIndex</var> is an integer index into <var>pattern</var><ol><li>Set <var>endIndex</var> to <emu-xref aoid="Call" id="_ref_239"><a href="https://tc39.github.io/ecma262/#sec-call">Call</a></emu-xref>(<emu-xref href="#sec-402-well-known-intrinsic-objects" id="_ref_240"><a href="#sec-402-well-known-intrinsic-objects">%StringProto_indexOf%</a></emu-xref>, <var>pattern</var>, « <code>"}"</code>, <var>beginIndex</var> »).</li><li>Assert: <var>endIndex</var> is greater than <var>beginIndex</var>.</li><li>If <var>beginIndex</var> is greater than <var>nextIndex</var>, then<ol><li>Let <var>literal</var> be a substring of <var>pattern</var> from position <var>nextIndex</var>, inclusive, to position <var>beginIndex</var>, exclusive.</li><li>Append a new <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref> { [[Type]]: <code>"literal"</code>, [[Value]]: <var>literal</var> } as the last element of <var>result</var>.</li></ol></li><li>Let <var>p</var> be the substring of <var>pattern</var> from position <var>beginIndex</var>, exclusive, to position <var>endIndex</var>, exclusive.</li><li>If <var>p</var> is equal to <code>"number"</code>, then<ol><li>If <var>x</var> is <emu-val>NaN</emu-val>, then<ol><li>Let <var>n</var> be an implementation- and locale-dependent (ILD) String value indicating the <emu-val>NaN</emu-val> value.</li><li>Append a new <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref> { [[Type]]: <code>"nan"</code>, [[Value]]: <var>n</var> } as the last element of <var>result</var>.</li></ol></li><li>Else if <var>x</var> is not a finite Number,<ol><li>Let <var>n</var> be an ILD String value indicating infinity.</li><li>Append a new <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref> { [[Type]]: <code>"infinity"</code>, [[Value]]: <var>n</var> } as the last element of <var>result</var>.</li></ol></li><li>Else,<ol><li>If <var>numberFormat</var>.[[Style]] is <code>"percent"</code>, let <var>x</var> be 100 × <var>x</var>.</li><li>Let <var>n</var> be <emu-xref aoid="FormatNumberToString" id="_ref_241"><a href="#sec-formatnumberstring">FormatNumberToString</a></emu-xref>(<var>numberFormat</var>, <var>x</var>).</li><li>If the <var>numberFormat</var>.[[NumberingSystem]] matches one of the values in the <code>"Numbering System"</code> column of <emu-xref href="#table-numbering-system-digits" id="_ref_39"><a href="#table-numbering-system-digits">Table 3</a></emu-xref> below, then<ol><li>Let <var>digits</var> be a <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">List</a></emu-xref> whose 10 String valued elements are the UTF-16 string representations of the 10 <var>digits</var> specified in the <code>"Digits"</code> column of the matching row in <emu-xref href="#table-numbering-system-digits" id="_ref_40"><a href="#table-numbering-system-digits">Table 3</a></emu-xref>.</li><li>Replace each <var>digit</var> in <var>n</var> with the value of <var>digits</var>[<var>digit</var>].</li></ol></li><li>Else use an implementation dependent algorithm to map <var>n</var> to the appropriate representation of <var>n</var> in the given numbering system.</li><li>Let <var>decimalSepIndex</var> be <emu-xref aoid="Call" id="_ref_242"><a href="https://tc39.github.io/ecma262/#sec-call">Call</a></emu-xref>(<emu-xref href="#sec-402-well-known-intrinsic-objects" id="_ref_243"><a href="#sec-402-well-known-intrinsic-objects">%StringProto_indexOf%</a></emu-xref>, <var>n</var>, « <code>"."</code>, 0 »).</li><li>If <var>decimalSepIndex</var> &gt; 0, then<ol><li>Let <var>integer</var> be the substring of <var>n</var> from position 0, inclusive, to position <var>decimalSepIndex</var>, exclusive.</li><li>Let <var>fraction</var> be the substring of <var>n</var> from position <var>decimalSepIndex</var>, exclusive, to the end of <var>n</var>.</li></ol></li><li>Else,<ol><li>Let <var>integer</var> be <var>n</var>.</li><li>Let <var>fraction</var> be <emu-val>undefined</emu-val>.</li></ol></li><li>If the <var>numberFormat</var>.[[UseGrouping]] is <emu-val>true</emu-val>, then<ol><li>Let <var>groupSepSymbol</var> be the implementation-, locale-, and numbering system-dependent (ILND) String representing the grouping separator.</li><li>Let <var>groups</var> be a <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">List</a></emu-xref> whose elements are, in left to right order, the substrings defined by ILND set of locations within the <var>integer</var>.</li><li>Assert: The number of elements in <var>groups</var> <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">List</a></emu-xref> is greater than 0.</li><li>Repeat, while <var>groups</var> <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">List</a></emu-xref> is not empty<ol><li>Remove the first element from <var>groups</var> and let <var>integerGroup</var> be the value of that element.</li><li>Append a new <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref> { [[Type]]: <code>"integer"</code>, [[Value]]: <var>integerGroup</var> } as the last element of <var>result</var>.</li><li>If <var>groups</var> <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">List</a></emu-xref> is not empty, then<ol><li>Append a new <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref> { [[Type]]: <code>"group"</code>, [[Value]]: <var>groupSepSymbol</var> } as the last element of <var>result</var>.</li></ol></li></ol></li></ol></li><li>Else,<ol><li>Append a new <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref> { [[Type]]: <code>"integer"</code>, [[Value]]: <var>integer</var> } as the last element of <var>result</var>.</li></ol></li><li>If <var>fraction</var> is not <emu-val>undefined</emu-val>, then<ol><li>Let <var>decimalSepSymbol</var> be the ILND String representing the decimal separator.</li><li>Append a new <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref> { [[Type]]: <code>"decimal"</code>, [[Value]]: <var>decimalSepSymbol</var> } as the last element of <var>result</var>.</li><li>Append a new <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref> { [[Type]]: <code>"fraction"</code>, [[Value]]: <var>fraction</var> } as the last element of <var>result</var>.</li></ol></li></ol></li></ol></li><li>Else if <var>p</var> is equal to <code>"plusSign"</code>, then<ol><li>Let <var>plusSignSymbol</var> be the ILND String representing the plus sign.</li><li>Append a new <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref> { [[Type]]: <code>"plusSign"</code>, [[Value]]: <var>plusSignSymbol</var> } as the last element of <var>result</var>.</li></ol></li><li>Else if <var>p</var> is equal to <code>"minusSign"</code>, then<ol><li>Let <var>minusSignSymbol</var> be the ILND String representing the minus sign.</li><li>Append a new <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref> { [[Type]]: <code>"minusSign"</code>, [[Value]]: <var>minusSignSymbol</var> } as the last element of <var>result</var>.</li></ol></li><li>Else if <var>p</var> is equal to <code>"percentSign"</code> and <var>numberFormat</var>.[[Style]] is <code>"percent"</code>, then<ol><li>Let <var>percentSignSymbol</var> be the ILND String representing the percent sign.</li><li>Append a new <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref> { [[Type]]: <code>"percentSign"</code>, [[Value]]: <var>percentSignSymbol</var> } as the last element of <var>result</var>.</li></ol></li><li>Else if <var>p</var> is equal to <code>"currency"</code> and <var>numberFormat</var>.[[Style]] is <code>"currency"</code>, then<ol><li>Let <var>currency</var> be <var>numberFormat</var>.[[Currency]].</li><li>Assert: <var>numberFormat</var>.[[CurrencyDisplay]] is <code>"code"</code>, <code>"symbol"</code> or <code>"name"</code>.</li><li>If <var>numberFormat</var>.[[CurrencyDisplay]] is <code>"code"</code>, then<ol><li>Let <var>cd</var> be <var>currency</var>.</li></ol></li><li>Else if <var>numberFormat</var>.[[CurrencyDisplay]] is <code>"symbol"</code>, then<ol><li>Let <var>cd</var> be an ILD string representing <var>currency</var> in short form. If the implementation does not have such a representation of <var>currency</var>, use <var>currency</var> itself.</li></ol></li><li>Else if <var>numberFormat</var>.[[CurrencyDisplay]] is <code>"name"</code>, then<ol><li>Let <var>cd</var> be an ILD string representing <var>currency</var> in long form. If the implementation does not have such a representation of <var>currency</var>, use <var>currency</var> itself.</li></ol></li><li>Append a new <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref> { [[Type]]: <code>"currency"</code>, [[Value]]: <var>cd</var> } as the last element of <var>result</var>.</li></ol></li><li>Else,<ol><li>Let <var>unknown</var> be an ILND String based on <var>x</var> and <var>p</var>.</li><li>Append a new <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref> { [[Type]]: <code>"unknown"</code>, [[Value]]: <var>unknown</var> } as the last element of <var>result</var>.</li></ol></li><li>Set <var>nextIndex</var> to <var>endIndex</var> + 1.</li><li>Set <var>beginIndex</var> to <emu-xref aoid="Call" id="_ref_244"><a href="https://tc39.github.io/ecma262/#sec-call">Call</a></emu-xref>(<emu-xref href="#sec-402-well-known-intrinsic-objects" id="_ref_245"><a href="#sec-402-well-known-intrinsic-objects">%StringProto_indexOf%</a></emu-xref>, <var>pattern</var>, « <code>"{"</code>, <var>nextIndex</var> »).</li></ol></li><li>If <var>nextIndex</var> is less than <var>length</var>, then<ol><li>Let <var>literal</var> be the substring of <var>pattern</var> from position <var>nextIndex</var>, inclusive, to position <var>length</var>, exclusive.</li><li>Append a new <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref> { [[Type]]: <code>"literal"</code>, [[Value]]: <var>literal</var> } as the last element of <var>result</var>.</li></ol></li><li>Return <var>result</var>.
      </li></ol></emu-alg>

      <emu-table id="table-numbering-system-digits"><figure><figcaption>Table 3: Numbering systems with simple digit mappings</figcaption>

        <table class="real-table">
          <thead>
            <tr>
              <th>Numbering System</th>
              <th>Digits</th>
            </tr>
          </thead>
          <tbody><tr>
            <td>arab</td>
            <td>U+0660 to U+0669</td>
          </tr>
          <tr>
            <td>arabext</td>
            <td>U+06F0 to U+06F9</td>
          </tr>
          <tr>
            <td>bali</td>
            <td>U+1B50 to U+1B59</td>
          </tr>
          <tr>
            <td>beng</td>
            <td>U+09E6 to U+09EF</td>
          </tr>
          <tr>
            <td>deva</td>
            <td>U+0966 to U+096F</td>
          </tr>
          <tr>
            <td>fullwide</td>
            <td>U+FF10 to U+FF19</td>
          </tr>
          <tr>
            <td>gujr</td>
            <td>U+0AE6 to U+0AEF</td>
          </tr>
          <tr>
            <td>guru</td>
            <td>U+0A66 to U+0A6F</td>
          </tr>
          <tr>
            <td>hanidec</td>
            <td>U+3007, U+4E00, U+4E8C, U+4E09, U+56DB, U+4E94, U+516D, U+4E03, U+516B, U+4E5D</td>
          </tr>
          <tr>
            <td>khmr</td>
            <td>U+17E0 to U+17E9</td>
          </tr>
          <tr>
            <td>knda</td>
            <td>U+0CE6 to U+0CEF</td>
          </tr>
          <tr>
            <td>laoo</td>
            <td>U+0ED0 to U+0ED9</td>
          </tr>
          <tr>
            <td>latn</td>
            <td>U+0030 to U+0039</td>
          </tr>
          <tr>
            <td>limb</td>
            <td>U+1946 to U+194F</td>
          </tr>
          <tr>
            <td>mlym</td>
            <td>U+0D66 to U+0D6F</td>
          </tr>
          <tr>
            <td>mong</td>
            <td>U+1810 to U+1819</td>
          </tr>
          <tr>
            <td>mymr</td>
            <td>U+1040 to U+1049</td>
          </tr>
          <tr>
            <td>orya</td>
            <td>U+0B66 to U+0B6F</td>
          </tr>
          <tr>
            <td>tamldec</td>
            <td>U+0BE6 to U+0BEF</td>
          </tr>
          <tr>
            <td>telu</td>
            <td>U+0C66 to U+0C6F</td>
          </tr>
          <tr>
            <td>thai</td>
            <td>U+0E50 to U+0E59</td>
          </tr>
          <tr>
            <td>tibt</td>
            <td>U+0F20 to U+0F29</td>
          </tr>
        </tbody></table>
      </figure></emu-table>

      <emu-note><span class="note">Note 1</span><div class="note-contents">
        The computations rely on String values and locations within numeric strings that are dependent upon the implementation and the effective locale of <var>numberFormat</var> ("ILD") or upon the implementation, the effective locale, and the numbering system of <var>numberFormat</var> ("ILND"). The ILD and ILND Strings mentioned, other than those for currency names, must not contain any characters in the General Category "Number, decimal digit" as specified by the Unicode Standard.

      </div></emu-note>

      <emu-note><span class="note">Note 2</span><div class="note-contents">
        It is recommended that implementations use the locale provided by the Common Locale Data Repository (available at  <a href="http://cldr.unicode.org/">http://cldr.unicode.org/</a>).

      </div></emu-note>
    </emu-clause>

    <emu-clause id="sec-formatnumber" aoid="FormatNumber">
      <h1><span class="secnum">11.1.7</span>FormatNumber( <var>numberFormat</var>, <var>x</var> )</h1>

      <p>
        The FormatNumber abstract operation is called with arguments <var>numberFormat</var> (which must be an object initialized as a NumberFormat) and <var>x</var> (which must be a Number value), and performs the following steps:

      </p>

      <emu-alg><ol><li>Let <var>parts</var> be ?&nbsp;<emu-xref aoid="PartitionNumberPattern" id="_ref_246"><a href="#sec-partitionnumberpattern">PartitionNumberPattern</a></emu-xref>(<var>numberFormat</var>, <var>x</var>).</li><li>Let <var>result</var> be the empty String.</li><li>For each <var>part</var> in <var>parts</var>, do<ol><li>Set <var>result</var> to a String value produced by concatenating <var>result</var> and <var>part</var>.[[Value]].</li></ol></li><li>Return <var>result</var>.
      </li></ol></emu-alg>
    </emu-clause>

    <emu-clause id="sec-formatnumbertoparts" aoid="FormatNumberToParts">
      <h1><span class="secnum">11.1.8</span>FormatNumberToParts( <var>numberFormat</var>, <var>x</var> )</h1>

      <p>
        The FormatNumberToParts abstract operation is called with arguments <var>numberFormat</var> (which must be an object initialized as a NumberFormat) and <var>x</var> (which must be a Number value), and performs the following steps:

      </p>

      <emu-alg><ol><li>Let <var>parts</var> be ?&nbsp;<emu-xref aoid="PartitionNumberPattern" id="_ref_247"><a href="#sec-partitionnumberpattern">PartitionNumberPattern</a></emu-xref>(<var>numberFormat</var>, <var>x</var>).</li><li>Let <var>result</var> be <emu-xref aoid="ArrayCreate" id="_ref_248"><a href="https://tc39.github.io/ecma262/#sec-arraycreate">ArrayCreate</a></emu-xref>(0).</li><li>Let <var>n</var> be 0.</li><li>For each <var>part</var> in <var>parts</var>, do<ol><li>Let <var>O</var> be <emu-xref aoid="ObjectCreate" id="_ref_249"><a href="https://tc39.github.io/ecma262/#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-xref href="#sec-properties-of-the-object-prototype-object"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>).</li><li>Perform !&nbsp;<emu-xref aoid="CreateDataPropertyOrThrow" id="_ref_250"><a href="https://tc39.github.io/ecma262/#sec-createdatapropertyorthrow">CreateDataPropertyOrThrow</a></emu-xref>(<var>O</var>, <code>"type"</code>, <var>part</var>.[[Type]]).</li><li>Perform !&nbsp;<emu-xref aoid="CreateDataPropertyOrThrow" id="_ref_251"><a href="https://tc39.github.io/ecma262/#sec-createdatapropertyorthrow">CreateDataPropertyOrThrow</a></emu-xref>(<var>O</var>, <code>"value"</code>, <var>part</var>.[[Value]]).</li><li>Perform !&nbsp;<emu-xref aoid="CreateDataPropertyOrThrow" id="_ref_252"><a href="https://tc39.github.io/ecma262/#sec-createdatapropertyorthrow">CreateDataPropertyOrThrow</a></emu-xref>(<var>result</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_253"><a href="https://tc39.github.io/ecma262/#sec-tostring">ToString</a></emu-xref>(<var>n</var>), <var>O</var>).</li><li>Increment <var>n</var> by 1.</li></ol></li><li>Return <var>result</var>.
      </li></ol></emu-alg>
    </emu-clause>

    <emu-clause id="sec-torawprecision" aoid="ToRawPrecision">
      <h1><span class="secnum">11.1.9</span>ToRawPrecision( <var>x</var>, <var>minPrecision</var>, <var>maxPrecision</var> )</h1>

      <p>
        When the ToRawPrecision abstract operation is called with arguments <var>x</var> (which must be a finite non-negative number), <var>minPrecision</var>, and <var>maxPrecision</var> (both must be integers between 1 and 21), the following steps are taken:

      </p>

      <emu-alg><ol><li>Let <var>p</var> be <var>maxPrecision</var>.</li><li>If <var>x</var> = 0, then<ol><li>Let <var>m</var> be the String consisting of <var>p</var> occurrences of the character <code>"0"</code>.</li><li>Let <var>e</var> be 0.</li></ol></li><li>Else,<ol><li>Let <var>e</var> and <var>n</var> be integers such that 10<sup><var>p</var>–1</sup> ≤ <var>n</var> &lt; 10<sup><var>p</var></sup> and for which the exact mathematical value of <var>n</var> × 10<sup><var>e</var>–<var>p</var>+1</sup> – <var>x</var> is as close to zero as possible. If there are two such sets of <var>e</var> and <var>n</var>, pick the <var>e</var> and <var>n</var> for which <var>n</var> × 10<sup><var>e</var>–<var>p</var>+1</sup> is larger.</li><li>Let <var>m</var> be the String consisting of the digits of the decimal representation of <var>n</var> (in order, with no leading zeroes).</li></ol></li><li>If <var>e</var> ≥ <var>p</var>, then<ol><li>Return the concatenation of <var>m</var> and <var>e</var>-<var>p</var>+1 occurrences of the character <code>"0"</code>.</li></ol></li><li>If <var>e</var> = <var>p</var>-1, then<ol><li>Return <var>m</var>.</li></ol></li><li>If <var>e</var> ≥ 0, then<ol><li>Let <var>m</var> be the concatenation of the first <var>e</var>+1 characters of <var>m</var>, the character <code>"."</code>, and the remaining <var>p</var>–(<var>e</var>+1) characters of <var>m</var>.</li></ol></li><li>If <var>e</var> &lt; 0, then<ol><li>Let <var>m</var> be the concatenation of the String <code>"0."</code>, –(<var>e</var>+1) occurrences of the character <code>"0"</code>, and the string <var>m</var>.</li></ol></li><li>If <var>m</var> contains the character <code>"."</code>, and <var>maxPrecision</var> &gt; <var>minPrecision</var>, then<ol><li>Let <var>cut</var> be <var>maxPrecision</var> – <var>minPrecision</var>.</li><li>Repeat, while <var>cut</var> &gt; 0 and the last character of <var>m</var> is <code>"0"</code><ol><li>Remove the last character from <var>m</var>.</li><li>Decrease <var>cut</var> by 1.</li></ol></li><li>If the last character of <var>m</var> is <code>"."</code>, then<ol><li>Remove the last character from <var>m</var>.</li></ol></li></ol></li><li>Return <var>m</var>.
      </li></ol></emu-alg>
    </emu-clause>

    <emu-clause id="sec-torawfixed" aoid="ToRawFixed">
      <h1><span class="secnum">11.1.10</span>ToRawFixed( <var>x</var>, <var>minInteger</var>, <var>minFraction</var>, <var>maxFraction</var> )</h1>

      <p>
        When the ToRawFixed abstract operation is called with arguments <var>x</var> (which must be a finite non-negative number), <var>minInteger</var> (which must be an integer between 1 and 21), <var>minFraction</var>, and <var>maxFraction</var> (which must be integers between 0 and 20), the following steps are taken:

      </p>

      <emu-alg><ol><li>Let <var>f</var> be <var>maxFraction</var>.</li><li>Let <var>n</var> be an integer for which the exact mathematical value of <var>n</var> ÷ 10<sup><var>f</var></sup> – <var>x</var> is as close to zero as possible. If there are two such <var>n</var>, pick the larger <var>n</var>.</li><li>If <var>n</var> = 0, let <var>m</var> be the String <code>"0"</code>. Otherwise, let <var>m</var> be the String consisting of the digits of the decimal representation of <var>n</var> (in order, with no leading zeroes).</li><li>If <var>f</var> ≠ 0, then<ol><li>Let <var>k</var> be the number of characters in <var>m</var>.</li><li>If <var>k</var> ≤ <var>f</var>, then<ol><li>Let <var>z</var> be the String consisting of <var>f</var>+1–<var>k</var> occurrences of the character <code>"0"</code>.</li><li>Let <var>m</var> be the concatenation of Strings <var>z</var> and <var>m</var>.</li><li>Let <var>k</var> be <var>f</var>+1.</li></ol></li><li>Let <var>a</var> be the first <var>k</var>–<var>f</var> characters of <var>m</var>, and let <var>b</var> be the remaining <var>f</var> characters of <var>m</var>.</li><li>Let <var>m</var> be the concatenation of the three Strings <var>a</var>, <code>"."</code>, and <var>b</var>.</li><li>Let <var>int</var> be the number of characters in <var>a</var>.</li></ol></li><li>Else, let <var>int</var> be the number of characters in <var>m</var>.</li><li>Let <var>cut</var> be <var>maxFraction</var> – <var>minFraction</var>.</li><li>Repeat, while <var>cut</var> &gt; 0 and the last character of <var>m</var> is <code>"0"</code><ol><li>Remove the last character from <var>m</var>.</li><li>Decrease <var>cut</var> by 1.</li></ol></li><li>If the last character of <var>m</var> is <code>"."</code>, then<ol><li>Remove the last character from <var>m</var>.</li></ol></li><li>If <var>int</var> &lt; <var>minInteger</var>, then<ol><li>Let <var>z</var> be the String consisting of <var>minInteger</var>–<var>int</var> occurrences of the character <code>"0"</code>.</li><li>Let <var>m</var> be the concatenation of Strings <var>z</var> and <var>m</var>.</li></ol></li><li>Return <var>m</var>.
      </li></ol></emu-alg>
    </emu-clause>

    <emu-clause id="sec-unwrapnumberformat" aoid="UnwrapNumberFormat">
      <h1><span class="secnum">11.1.11</span>UnwrapNumberFormat( <var>nf</var> )</h1>
      <p>
        The UnwrapNumberFormat abstract operation gets the underlying NumberFormat operation
        for various methods which implement ECMA-402 v1 semantics for supporting initializing
        existing Intl objects.

      </p>
      <emu-alg><ol><li>Assert: <emu-xref aoid="Type" id="_ref_254"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>nf</var>) is Object.
      </li></ol></emu-alg>
      <emu-normative-optional>
      <emu-alg><ol start="2"><li>If <var>nf</var> does not have an [[InitializedNumberFormat]] internal slot and ?&nbsp;<emu-xref aoid="InstanceofOperator" id="_ref_255"><a href="https://tc39.github.io/ecma262/#sec-instanceofoperator">InstanceofOperator</a></emu-xref>(<var>nf</var>, <emu-xref href="#sec-intl-numberformat-constructor" id="_ref_256"><a href="#sec-intl-numberformat-constructor">%NumberFormat%</a></emu-xref>) is <emu-val>true</emu-val>, then<ol><li>Let <var>nf</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_257"><a href="https://tc39.github.io/ecma262/#sec-get-o-p">Get</a></emu-xref>(<var>nf</var>, <emu-xref href="#intl-object" id="_ref_258"><a href="#intl-object">%Intl%</a></emu-xref>.[[FallbackSymbol]]).
      </li></ol></li></ol></emu-alg>
      </emu-normative-optional>
      <emu-alg><ol start="3"><li>If <emu-xref aoid="Type" id="_ref_259"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>nf</var>) is not Object or <var>nf</var> does not have an [[InitializedNumberFormat]] internal slot, then<ol><li>Throw a <emu-val>TypeError</emu-val> exception.</li></ol></li><li>Return <var>nf</var>.
      </li></ol></emu-alg>
      <emu-note><span class="note">Note</span><div class="note-contents">See  <emu-xref href="#legacy-constructor" id="_ref_41"><a href="#legacy-constructor">8.1 Note 1</a></emu-xref> for the motivation of the normative optional text.</div></emu-note>
    </emu-clause>
  </emu-clause>

  <emu-clause id="sec-intl-numberformat-constructor">
    <h1><span class="secnum">11.2</span>The Intl.NumberFormat Constructor</h1>

    <p>
      The NumberFormat constructor is the  <dfn>%NumberFormat%</dfn> intrinsic object and a standard built-in property of the Intl object. Behaviour common to all service constructor properties of the Intl object is specified in  <emu-xref href="#sec-internal-slots" id="_ref_42"><a href="#sec-internal-slots">9.1</a></emu-xref>.

    </p>

    <emu-clause id="sec-intl.numberformat">
      <h1><span class="secnum">11.2.1</span>Intl.NumberFormat ( [ <var>locales</var> [ , <var>options</var> ] ] )</h1>

      <p>
        When the <code>Intl.NumberFormat</code> function is called with optional arguments <var>locales</var> and <var>options</var>, the following steps are taken:

      </p>

      <emu-alg><ol><li>If NewTarget is <emu-val>undefined</emu-val>, let <var>newTarget</var> be the <emu-xref href="#active-function-object"><a href="https://tc39.github.io/ecma262/#active-function-object">active function object</a></emu-xref>, else let <var>newTarget</var> be NewTarget.</li><li>Let <var>numberFormat</var> be ?&nbsp;<emu-xref aoid="OrdinaryCreateFromConstructor" id="_ref_260"><a href="https://tc39.github.io/ecma262/#sec-ordinarycreatefromconstructor">OrdinaryCreateFromConstructor</a></emu-xref>(<var>newTarget</var>, <code>"%NumberFormatPrototype%"</code>, « [[InitializedNumberFormat]], [[Locale]], [[NumberingSystem]], [[Style]], [[Currency]], [[CurrencyDisplay]], [[MinimumIntegerDigits]], [[MinimumFractionDigits]], [[MaximumFractionDigits]], [[MinimumSignificantDigits]], [[MaximumSignificantDigits]], [[UseGrouping]], [[PositivePattern]], [[NegativePattern]], [[BoundFormat]] »).</li><li>Perform ?&nbsp;<emu-xref aoid="InitializeNumberFormat" id="_ref_261"><a href="#sec-initializenumberformat">InitializeNumberFormat</a></emu-xref>(<var>numberFormat</var>, <var>locales</var>, <var>options</var>).
      </li></ol></emu-alg>
      <emu-normative-optional>
      <emu-alg><ol start="4"><li>Let <var>this</var> be the <emu-val>this</emu-val> value.</li><li>If NewTarget is <emu-val>undefined</emu-val> and ?&nbsp;<emu-xref aoid="InstanceofOperator" id="_ref_262"><a href="https://tc39.github.io/ecma262/#sec-instanceofoperator">InstanceofOperator</a></emu-xref>(<var>this</var>, <emu-xref href="#sec-intl-numberformat-constructor" id="_ref_263"><a href="#sec-intl-numberformat-constructor">%NumberFormat%</a></emu-xref>) is <emu-val>true</emu-val>, then<ol><li>Perform ?&nbsp;<emu-xref aoid="DefinePropertyOrThrow" id="_ref_264"><a href="https://tc39.github.io/ecma262/#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>this</var>, <emu-xref href="#intl-object" id="_ref_265"><a href="#intl-object">%Intl%</a></emu-xref>.[[FallbackSymbol]], PropertyDescriptor{ [[Value]]: <var>numberFormat</var>, [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }).</li><li>Return <var>this</var>.
      </li></ol></li></ol></emu-alg>
      </emu-normative-optional>
      <emu-alg><ol start="6"><li>Return <var>numberFormat</var>.
      </li></ol></emu-alg>
    </emu-clause>
    <emu-note><span class="note">Note</span><div class="note-contents">See  <emu-xref href="#legacy-constructor" id="_ref_43"><a href="#legacy-constructor">8.1 Note 1</a></emu-xref> for the motivation of the normative optional text.</div></emu-note>
  </emu-clause>

  <emu-clause id="sec-properties-of-intl-numberformat-constructor">
    <h1><span class="secnum">11.3</span>Properties of the Intl.NumberFormat Constructor</h1>

    <p>
      The Intl.NumberFormat constructor has the following properties:

    </p>

    <emu-clause id="sec-intl.numberformat.prototype">
      <h1><span class="secnum">11.3.1</span>Intl.NumberFormat.prototype</h1>

      <p>
        The value of <code>Intl.NumberFormat.prototype</code> is <emu-xref href="#sec-properties-of-intl-numberformat-prototype-object" id="_ref_266"><a href="#sec-properties-of-intl-numberformat-prototype-object">%NumberFormatPrototype%</a></emu-xref>.

      </p>
      <p>
        This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.

      </p>
    </emu-clause>

    <emu-clause id="sec-intl.numberformat.supportedlocalesof">
      <h1><span class="secnum">11.3.2</span>Intl.NumberFormat.supportedLocalesOf ( <var>locales</var> [ , <var>options</var> ] )</h1>

      <p>
        When the <code>supportedLocalesOf</code> method is called with arguments <var>locales</var> and <var>options</var>, the following steps are taken:

      </p>

      <emu-alg><ol><li>Let <var>availableLocales</var> be <emu-xref href="#sec-intl-numberformat-constructor" id="_ref_267"><a href="#sec-intl-numberformat-constructor">%NumberFormat%</a></emu-xref>.[[AvailableLocales]].</li><li>Let <var>requestedLocales</var> be ?&nbsp;<emu-xref aoid="CanonicalizeLocaleList" id="_ref_268"><a href="#sec-canonicalizelocalelist">CanonicalizeLocaleList</a></emu-xref>(<var>locales</var>).</li><li>Return ?&nbsp;<emu-xref aoid="SupportedLocales" id="_ref_269"><a href="#sec-supportedlocales">SupportedLocales</a></emu-xref>(<var>availableLocales</var>, <var>requestedLocales</var>, <var>options</var>).
      </li></ol></emu-alg>

      <p>
        The value of the <code>length</code> property of the <emu-val>supportedLocalesOf</emu-val> method is 1.

      </p>
    </emu-clause>

    <emu-clause id="sec-intl.numberformat-internal-slots">
      <h1><span class="secnum">11.3.3</span>Internal slots</h1>

      <p>
        The value of the [[AvailableLocales]] internal slot is implementation defined within the constraints described in  <emu-xref href="#sec-internal-slots" id="_ref_44"><a href="#sec-internal-slots">9.1</a></emu-xref>.

      </p>

      <p>
        The value of the [[RelevantExtensionKeys]] internal slot is « <code>"nu"</code> ».

      </p>

      <emu-note><span class="note">Note 1</span><div class="note-contents">
        Unicode Technical Standard 35 describes two locale extension keys that are relevant to number formatting, <code>"nu"</code> for numbering system and <code>"cu"</code> for currency. Intl.NumberFormat, however, requires that the currency of a currency format is specified through the currency property in the options objects.

      </div></emu-note>

      <p>
        The value of the [[LocaleData]] internal slot is implementation defined within the constraints described in  <emu-xref href="#sec-internal-slots" id="_ref_45"><a href="#sec-internal-slots">9.1</a></emu-xref> and the following additional constraints:

      </p>

      <ul>
        <li>The list that is the value of the <code>"nu"</code> field of any locale field of [[LocaleData]] must not include the values <code>"native"</code>, <code>"traditio"</code>, or <code>"finance"</code>.</li>
        <li>[[LocaleData]][locale] must have a patterns field for all locale values. The value of this field must be a record, which must have fields with the names of the three number format styles: <code>"decimal"</code>, <code>"percent"</code>, and <code>"currency"</code>. Each of these fields in turn must be a record with the fields positivePattern and negativePattern. The value of these fields must be string values that must contain the substring <code>"{number}"</code> and may contain the substrings <code>"{plusSign}"</code>, and <code>"{minusSign}"</code>; the values within the percent field must also contain the substring <code>"{percentSign}"</code>; the values within the currency field must also contain the substring <code>"{currency}"</code>. The pattern strings must not contain any characters in the General Category "Number, decimal digit" as specified by the Unicode Standard.</li>
      </ul>

      <emu-note><span class="note">Note 2</span><div class="note-contents">
        It is recommended that implementations use the locale data provided by the Common Locale Data Repository (available at  <a href="http://cldr.unicode.org/">http://cldr.unicode.org/</a>).

      </div></emu-note>
    </emu-clause>
  </emu-clause>

  <emu-clause id="sec-properties-of-intl-numberformat-prototype-object">
    <h1><span class="secnum">11.4</span>Properties of the Intl.NumberFormat Prototype Object</h1>

    <p>
      The Intl.NumberFormat prototype object is itself an ordinary object.  <dfn>%NumberFormatPrototype%</dfn> is not an Intl.NumberFormat instance and does not have an [[InitializedNumberFormat]] internal slot or any of the other internal slots of Intl.NumberFormat instance objects.

    </p>

    <emu-clause id="sec-intl.numberformat.prototype.constructor">
      <h1><span class="secnum">11.4.1</span>Intl.NumberFormat.prototype.constructor</h1>

      <p>
        The initial value of <code>Intl.NumberFormat.prototype.constructor</code> is the intrinsic object <emu-xref href="#sec-intl-numberformat-constructor" id="_ref_270"><a href="#sec-intl-numberformat-constructor">%NumberFormat%</a></emu-xref>.

      </p>
    </emu-clause>

    <emu-clause id="sec-intl.numberformat.prototype-@@tostringtag">
      <h1><span class="secnum">11.4.2</span>Intl.NumberFormat.prototype [ @@toStringTag ]</h1>

      <p>
        The initial value of the @@toStringTag property is the string value <code>"Object"</code>.

      </p>
      <p>
        This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.

      </p>
    </emu-clause>

    <emu-clause id="sec-intl.numberformat.prototype.format">
      <h1><span class="secnum">11.4.3</span>get Intl.NumberFormat.prototype.format</h1>

      <p>
        Intl.NumberFormat.prototype.format is an accessor property whose set accessor function is <emu-val>undefined</emu-val>. Its get accessor function performs the following steps:

      </p>

      <emu-alg><ol><li>Let <var>nf</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_271"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>nf</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>nf</var> be ?&nbsp;<emu-xref aoid="UnwrapNumberFormat" id="_ref_272"><a href="#sec-unwrapnumberformat">UnwrapNumberFormat</a></emu-xref>(<var>nf</var>).</li><li>If <var>nf</var>.[[BoundFormat]] is <emu-val>undefined</emu-val>, then<ol><li>Let <var>F</var> be a new built-in function object as defined in Number Format Functions (<emu-xref href="#sec-number-format-functions" id="_ref_46"><a href="#sec-number-format-functions">11.1.4</a></emu-xref>).</li><li>Set <var>F</var>.[[NumberFormat]] to <var>nf</var>.</li><li>Set <var>nf</var>.[[BoundFormat]] to <var>F</var>.</li></ol></li><li>Return <var>nf</var>.[[BoundFormat]].
      </li></ol></emu-alg>

      <emu-note><span class="note">Note</span><div class="note-contents">
        The returned function is bound to <var>nf</var> so that it can be passed directly to <code>Array.prototype.map</code> or other functions.
        This is considered a historical artefact, as part of a convention which is no longer followed for new features, but is preserved to maintain compatibility with existing programs.

      </div></emu-note>
    </emu-clause>

    <emu-clause id="sec-intl.numberformat.prototype.formattoparts">
      <h1><span class="secnum">11.4.4</span>Intl.NumberFormat.prototype.formatToParts ( <var>value</var> )</h1>

      <p>
        When the <code>formatToParts</code> method is called with an optional argument <var>value</var>, the following steps are taken:

      </p>

      <emu-alg><ol><li>Let <var>nf</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_273"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>nf</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>nf</var> does not have an [[InitializedNumberFormat]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>x</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_274"><a href="https://tc39.github.io/ecma262/#sec-tonumber">ToNumber</a></emu-xref>(<var>value</var>).</li><li>Return ?&nbsp;<emu-xref aoid="FormatNumberToParts" id="_ref_275"><a href="#sec-formatnumbertoparts">FormatNumberToParts</a></emu-xref>(<var>nf</var>, <var>x</var>).
      </li></ol></emu-alg>
    </emu-clause>

    <emu-clause id="sec-intl.numberformat.prototype.resolvedoptions">
      <h1><span class="secnum">11.4.5</span>Intl.NumberFormat.prototype.resolvedOptions ()</h1>

      <p>
        This function provides access to the locale and formatting options computed during initialization of the object.

      </p>

      <emu-alg><ol><li>Let <var>nf</var> be <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_276"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>nf</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>nf</var> be ?&nbsp;<emu-xref aoid="UnwrapNumberFormat" id="_ref_277"><a href="#sec-unwrapnumberformat">UnwrapNumberFormat</a></emu-xref>(<var>nf</var>).</li><li>Let <var>options</var> be !&nbsp;<emu-xref aoid="ObjectCreate" id="_ref_278"><a href="https://tc39.github.io/ecma262/#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-xref href="#sec-properties-of-the-object-prototype-object"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>).</li><li>For each row of <emu-xref href="#table-numberformat-resolvedoptions-properties" id="_ref_47"><a href="#table-numberformat-resolvedoptions-properties">Table 4</a></emu-xref>, except the header row, in table order, do<ol><li>Let <var>p</var> be the Property value of the current row.</li><li>Let <var>v</var> be the value of <var>nf</var>'s internal slot whose name is the Internal Slot value of the current row.</li><li>If <var>v</var> is not <emu-val>undefined</emu-val>, then<ol><li>Perform !&nbsp;<emu-xref aoid="CreateDataPropertyOrThrow" id="_ref_279"><a href="https://tc39.github.io/ecma262/#sec-createdatapropertyorthrow">CreateDataPropertyOrThrow</a></emu-xref>(<var>options</var>, <var>p</var>, <var>v</var>).</li></ol></li></ol></li><li>Return <var>options</var>.
      </li></ol></emu-alg>

      <emu-table id="table-numberformat-resolvedoptions-properties"><figure><figcaption>Table 4: Resolved Options of NumberFormat Instances</figcaption>

        <table class="real-table">
          <thead>
            <tr>
              <th>Internal Slot</th>
              <th>Property</th>
            </tr>
          </thead>
          <tbody><tr>
            <td>[[Locale]]</td>
            <td><code>"locale"</code></td>
          </tr>
          <tr>
            <td>[[NumberingSystem]]</td>
            <td><code>"numberingSystem"</code></td>
          </tr>
          <tr>
            <td>[[Style]]</td>
            <td><code>"style"</code></td>
          </tr>
          <tr>
            <td>[[Currency]]</td>
            <td><code>"currency"</code></td>
          </tr>
          <tr>
            <td>[[CurrencyDisplay]]</td>
            <td><code>"currencyDisplay"</code></td>
          </tr>
          <tr>
            <td>[[MinimumIntegerDigits]]</td>
            <td><code>"minimumIntegerDigits"</code></td>
          </tr>
          <tr>
            <td>[[MinimumFractionDigits]]</td>
            <td><code>"minimumFractionDigits"</code></td>
          </tr>
          <tr>
            <td>[[MaximumFractionDigits]]</td>
            <td><code>"maximumFractionDigits"</code></td>
          </tr>
          <tr>
            <td>[[MinimumSignificantDigits]]</td>
            <td><code>"minimumSignificantDigits"</code></td>
          </tr>
          <tr>
            <td>[[MaximumSignificantDigits]]</td>
            <td><code>"maximumSignificantDigits"</code></td>
          </tr>
          <tr>
            <td>[[UseGrouping]]</td>
            <td><code>"useGrouping"</code></td>
          </tr>
        </tbody></table>
      </figure></emu-table>
    </emu-clause>
  </emu-clause>

  <emu-clause id="sec-properties-of-intl-numberformat-instances">
    <h1><span class="secnum">11.5</span>Properties of Intl.NumberFormat Instances</h1>

    <p>
      Intl.NumberFormat instances inherit properties from <emu-xref href="#sec-properties-of-intl-numberformat-prototype-object" id="_ref_280"><a href="#sec-properties-of-intl-numberformat-prototype-object">%NumberFormatPrototype%</a></emu-xref>.

    </p>

    <p>
      Intl.NumberFormat instances have an [[InitializedNumberFormat]] internal slot.

    </p>

    <p>
      Intl.NumberFormat instances also have several internal slots that are computed by the constructor:

    </p>

    <ul>
      <li>[[Locale]] is a String value with the language tag of the locale whose localization is used for formatting.</li>
      <li>[[NumberingSystem]] is a String value with the "type" given in Unicode Technical Standard 35 for the numbering system used for formatting.</li>
      <li>[[Style]] is one of the String values <code>"decimal"</code>, <code>"currency"</code>, or <code>"percent"</code>, identifying the number format style used.</li>
      <li>[[Currency]] is a String value with the currency code identifying the currency to be used if formatting with the <code>"currency"</code> style. It is only used when [[Style]] has the value <code>"currency"</code>.</li>
      <li>[[CurrencyDisplay]] is one of the String values <code>"code"</code>, <code>"symbol"</code>, or <code>"name"</code>, specifying whether to display the currency as an ISO 4217 alphabetic currency code, a localized currency symbol, or a localized currency name if formatting with the <code>"currency"</code> style. It is only used when [[Style]] has the value <code>"currency"</code>.</li>
      <li>[[MinimumIntegerDigits]] is a non-negative integer Number value indicating the minimum integer digits to be used. Numbers will be padded with leading zeroes if necessary.</li>
      <li>[[MinimumFractionDigits]] and [[MaximumFractionDigits]] are non-negative integer Number values indicating the minimum and maximum fraction digits to be used. Numbers will be rounded or padded with trailing zeroes if necessary.</li>
      <li>[[MinimumSignificantDigits]] and [[MaximumSignificantDigits]] are positive integer Number values indicating the minimum and maximum fraction digits to be shown. Either none or both of these properties are present; if they are, they override minimum and maximum integer and fraction digits – the formatter uses however many integer and fraction digits are required to display the specified number of significant digits.</li>
      <li>[[UseGrouping]] is a Boolean value indicating whether a grouping separator should be used.</li>
      <li>[[PositivePattern]] and [[NegativePattern]] are String values as described in  <emu-xref href="#sec-intl.numberformat-internal-slots" id="_ref_48"><a href="#sec-intl.numberformat-internal-slots">11.3.3</a></emu-xref>.</li>
    </ul>

    <p>
      Finally, Intl.NumberFormat instances have a [[BoundFormat]] internal slot that caches the function returned by the format accessor (<emu-xref href="#sec-intl.numberformat.prototype.format" id="_ref_49"><a href="#sec-intl.numberformat.prototype.format">11.4.3</a></emu-xref>).

    </p>
  </emu-clause>
</emu-clause>
</emu-import>
<emu-import href="./datetimeformat.html"><emu-clause id="datetimeformat-objects">
  <h1><span class="secnum">12</span>DateTimeFormat Objects</h1>

  <emu-clause id="sec-datetimeformat-abstracts">
    <h1><span class="secnum">12.1</span>Abstract Operations For DateTimeFormat Objects</h1>

    <p>
      Several DateTimeFormat algorithms use values from the following table, which provides internal slots, property names and allowable values for the components of date and time formats:

    </p>

    <emu-table id="table-datetimeformat-components"><figure><figcaption>Table 5: Components of date and time formats</figcaption>

      <table class="real-table">
        <thead>
          <tr>
            <th>Internal Slot</th>
            <th>Property</th>
            <th>Values</th>
          </tr>
        </thead>
        <tbody><tr>
          <td>[[Weekday]]</td>
          <td><code>"weekday"</code></td>
          <td><code>"narrow"</code>, <code>"short"</code>, <code>"long"</code></td>
        </tr>
        <tr>
          <td>[[Era]]</td>
          <td><code>"era"</code></td>
          <td><code>"narrow"</code>, <code>"short"</code>, <code>"long"</code></td>
        </tr>
        <tr>
          <td>[[Year]]</td>
          <td><code>"year"</code></td>
          <td><code>"2-digit"</code>, <code>"numeric"</code></td>
        </tr>
        <tr>
          <td>[[Month]]</td>
          <td><code>"month"</code></td>
          <td><code>"2-digit"</code>, <code>"numeric"</code>, <code>"narrow"</code>, <code>"short"</code>, <code>"long"</code></td>
        </tr>
        <tr>
          <td>[[Day]]</td>
          <td><code>"day"</code></td>
          <td><code>"2-digit"</code>, <code>"numeric"</code></td>
        </tr>
        <tr>
          <td>[[Hour]]</td>
          <td><code>"hour"</code></td>
          <td><code>"2-digit"</code>, <code>"numeric"</code></td>
        </tr>
        <tr>
          <td>[[Minute]]</td>
          <td><code>"minute"</code></td>
          <td><code>"2-digit"</code>, <code>"numeric"</code></td>
        </tr>
        <tr>
          <td>[[Second]]</td>
          <td><code>"second"</code></td>
          <td><code>"2-digit"</code>, <code>"numeric"</code></td>
        </tr>
        <tr>
          <td>[[TimeZoneName]]</td>
          <td><code>"timeZoneName"</code></td>
          <td><code>"short"</code>, <code>"long"</code></td>
        </tr>
      </tbody></table>
    </figure></emu-table>

    <emu-clause id="sec-initializedatetimeformat" aoid="InitializeDateTimeFormat">
      <h1><span class="secnum">12.1.1</span>InitializeDateTimeFormat ( <var>dateTimeFormat</var>, <var>locales</var>, <var>options</var> )</h1>

      <p>
        The abstract operation InitializeDateTimeFormat accepts the arguments <var>dateTimeFormat</var> (which must be an object), <var>locales</var>, and <var>options</var>. It initializes <var>dateTimeFormat</var> as a DateTimeFormat object. This abstract operation functions as follows:

      </p>

      <emu-alg><ol><li>Let <var>requestedLocales</var> be ?&nbsp;<emu-xref aoid="CanonicalizeLocaleList" id="_ref_281"><a href="#sec-canonicalizelocalelist">CanonicalizeLocaleList</a></emu-xref>(<var>locales</var>).</li><li>Let <var>options</var> be ?&nbsp;<emu-xref aoid="ToDateTimeOptions" id="_ref_282"><a href="#sec-todatetimeoptions">ToDateTimeOptions</a></emu-xref>(<var>options</var>, <code>"any"</code>, <code>"date"</code>).</li><li>Let <var>opt</var> be a new <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref>.</li><li>Let <var>matcher</var> be ?&nbsp;<emu-xref aoid="GetOption" id="_ref_283"><a href="#sec-getoption">GetOption</a></emu-xref>(<var>options</var>, <code>"localeMatcher"</code>, <code>"string"</code>, « <code>"lookup"</code>, <code>"best fit"</code> », <code>"best fit"</code>).</li><li>Set <var>opt</var>.[[localeMatcher]] to <var>matcher</var>.</li><li>Let <var>hour12</var> be ?&nbsp;<emu-xref aoid="GetOption" id="_ref_284"><a href="#sec-getoption">GetOption</a></emu-xref>(<var>options</var>, <code>"hour12"</code>, <code>"boolean"</code>, <emu-val>undefined</emu-val>, <emu-val>undefined</emu-val>).</li><li>Let <var>hourCycle</var> be ?&nbsp;<emu-xref aoid="GetOption" id="_ref_285"><a href="#sec-getoption">GetOption</a></emu-xref>(<var>options</var>, <code>"hourCycle"</code>, <code>"string"</code>, « <code>"h11"</code>, <code>"h12"</code>, <code>"h23"</code>, <code>"h24"</code> », <emu-val>undefined</emu-val>).</li><li>If <var>hour12</var> is not <emu-val>undefined</emu-val>, then<ol><li>Let <var>hourCycle</var> be <emu-val>null</emu-val>.</li></ol></li><li>Set <var>opt</var>.[[hc]] to <var>hourCycle</var>.</li><li>Let <var>localeData</var> be <emu-xref href="#sec-intl-datetimeformat-constructor" id="_ref_286"><a href="#sec-intl-datetimeformat-constructor">%DateTimeFormat%</a></emu-xref>.[[LocaleData]].</li><li>Let <var>r</var> be <emu-xref aoid="ResolveLocale" id="_ref_287"><a href="#sec-resolvelocale">ResolveLocale</a></emu-xref>( <emu-xref href="#sec-intl-datetimeformat-constructor" id="_ref_288"><a href="#sec-intl-datetimeformat-constructor">%DateTimeFormat%</a></emu-xref>.[[AvailableLocales]], <var>requestedLocales</var>, <var>opt</var>, <emu-xref href="#sec-intl-datetimeformat-constructor" id="_ref_289"><a href="#sec-intl-datetimeformat-constructor">%DateTimeFormat%</a></emu-xref>.[[RelevantExtensionKeys]], <var>localeData</var>).</li><li>Set <var>dateTimeFormat</var>.[[Locale]] to <var>r</var>.[[locale]].</li><li>Set <var>dateTimeFormat</var>.[[Calendar]] to <var>r</var>.[[ca]].</li><li>Set <var>dateTimeFormat</var>.[[HourCycle]] to <var>r</var>.[[hc]].</li><li>Set <var>dateTimeFormat</var>.[[NumberingSystem]] to <var>r</var>.[[nu]].</li><li>Let <var>dataLocale</var> be <var>r</var>.[[dataLocale]].</li><li>Let <var>timeZone</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_290"><a href="https://tc39.github.io/ecma262/#sec-get-o-p">Get</a></emu-xref>(<var>options</var>, <code>"timeZone"</code>).</li><li>If <var>timeZone</var> is not <emu-val>undefined</emu-val>, then<ol><li>Let <var>timeZone</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_291"><a href="https://tc39.github.io/ecma262/#sec-tostring">ToString</a></emu-xref>(<var>timeZone</var>).</li><li>If the result of <emu-xref aoid="IsValidTimeZoneName" id="_ref_292"><a href="#sec-isvalidtimezonename">IsValidTimeZoneName</a></emu-xref>(<var>timeZone</var>) is <emu-val>false</emu-val>, then<ol><li>Throw a <emu-val>RangeError</emu-val> exception.</li></ol></li><li>Let <var>timeZone</var> be <emu-xref aoid="CanonicalizeTimeZoneName" id="_ref_293"><a href="#sec-canonicalizetimezonename">CanonicalizeTimeZoneName</a></emu-xref>(<var>timeZone</var>).</li></ol></li><li>Else,<ol><li>Let <var>timeZone</var> be <emu-xref aoid="DefaultTimeZone" id="_ref_294"><a href="#sec-defaulttimezone">DefaultTimeZone</a></emu-xref>().</li></ol></li><li>Set <var>dateTimeFormat</var>.[[TimeZone]] to <var>timeZone</var>.</li><li>Let <var>opt</var> be a new <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref>.</li><li>For each row of <emu-xref href="#table-datetimeformat-components" id="_ref_50"><a href="#table-datetimeformat-components">Table 5</a></emu-xref>, except the header row, in table order, do<ol><li>Let <var>prop</var> be the name given in the Property column of the row.</li><li>Let <var>value</var> be ?&nbsp;<emu-xref aoid="GetOption" id="_ref_295"><a href="#sec-getoption">GetOption</a></emu-xref>(<var>options</var>, <var>prop</var>, <code>"string"</code>, « the strings given in the Values column of the row », <emu-val>undefined</emu-val>).</li><li>Set <var>opt</var>.[[&lt;<var>prop</var>&gt;]] to <var>value</var>.</li></ol></li><li>Let <var>dataLocaleData</var> be <var>localeData</var>.[[&lt;<var>dataLocale</var>&gt;]].</li><li>Let <var>formats</var> be <var>dataLocaleData</var>.[[formats]].</li><li>Let <var>matcher</var> be ?&nbsp;<emu-xref aoid="GetOption" id="_ref_296"><a href="#sec-getoption">GetOption</a></emu-xref>(<var>options</var>, <code>"formatMatcher"</code>, <code>"string"</code>, « <code>"basic"</code>, <code>"best fit"</code> », <code>"best fit"</code>).</li><li>If <var>matcher</var> is <code>"basic"</code>, then<ol><li>Let <var>bestFormat</var> be <emu-xref aoid="BasicFormatMatcher" id="_ref_297"><a href="#sec-basicformatmatcher">BasicFormatMatcher</a></emu-xref>(<var>opt</var>, <var>formats</var>).</li></ol></li><li>Else,<ol><li>Let <var>bestFormat</var> be <emu-xref aoid="BestFitFormatMatcher" id="_ref_298"><a href="#sec-bestfitformatmatcher">BestFitFormatMatcher</a></emu-xref>(<var>opt</var>, <var>formats</var>).</li></ol></li><li>For each row in <emu-xref href="#table-datetimeformat-components" id="_ref_51"><a href="#table-datetimeformat-components">Table 5</a></emu-xref>, except the header row, in table order, do<ol><li>Let <var>prop</var> be the name given in the Property column of the row.</li><li>Let <var>p</var> be <var>bestFormat</var>.[[&lt;<var>prop</var>&gt;]].</li><li>If <var>p</var> not <emu-val>undefined</emu-val>, then<ol><li>Set <var>dateTimeFormat</var>'s internal slot whose name is the Internal Slot column of the row to <var>p</var>.</li></ol></li></ol></li><li>If <var>dateTimeFormat</var>.[[Hour]] is not <emu-val>undefined</emu-val>, then<ol><li>Let <var>hcDefault</var> be <var>dataLocaleData</var>.[[hourCycle]].</li><li>Let <var>hc</var> be <var>dateTimeFormat</var>.[[HourCycle]].</li><li>If <var>hc</var> is <emu-val>null</emu-val>, then<ol><li>Set <var>hc</var> to <var>hcDefault</var>.</li></ol></li><li>If <var>hour12</var> is not <emu-val>undefined</emu-val>, then<ol><li>If <var>hour12</var> is <emu-val>true</emu-val>, then<ol><li>If <var>hcDefault</var> is <code>"h11"</code> or <code>"h23"</code>, then<ol><li>Set <var>hc</var> to <code>"h11"</code>.</li></ol></li><li>Else,<ol><li>Set <var>hc</var> to <code>"h12"</code>.</li></ol></li></ol></li><li>Else,<ol><li>Assert: <var>hour12</var> is <emu-val>false</emu-val>.</li><li>If <var>hcDefault</var> is <code>"h11"</code> or <code>"h23"</code>, then<ol><li>Set <var>hc</var> to <code>"h23"</code>.</li></ol></li><li>Else,<ol><li>Set <var>hc</var> to <code>"h24"</code>.</li></ol></li></ol></li></ol></li><li>Set <var>dateTimeFormat</var>.[[HourCycle]] to <var>hc</var>.</li><li>If <var>dateTimeformat</var>.[[HourCycle]] is <code>"h11"</code> or <code>"h12"</code>, then<ol><li>Let <var>pattern</var> be <var>bestFormat</var>.[[pattern12]].</li></ol></li><li>Else,<ol><li>Let <var>pattern</var> be <var>bestFormat</var>.[[pattern]].</li></ol></li></ol></li><li>Else,<ol><li>Set <var>dateTimeFormat</var>.[[HourCycle]] to <emu-val>undefined</emu-val>.</li><li>Let <var>pattern</var> be <var>bestFormat</var>.[[pattern]].</li></ol></li><li>Set <var>dateTimeFormat</var>.[[Pattern]] to <var>pattern</var>.</li><li>Return <var>dateTimeFormat</var>.
      </li></ol></emu-alg>
    </emu-clause>

    <emu-clause id="sec-todatetimeoptions" aoid="ToDateTimeOptions">
      <h1><span class="secnum">12.1.2</span>ToDateTimeOptions ( <var>options</var>, <var>required</var>, <var>defaults</var> )</h1>

      <p>
        When the ToDateTimeOptions abstract operation is called with arguments <var>options</var>, <var>required</var>, and <var>defaults</var>, the following steps are taken:

      </p>

      <emu-alg><ol><li>If <var>options</var> is <emu-val>undefined</emu-val>, let <var>options</var> be <emu-val>null</emu-val>; otherwise let <var>options</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_299"><a href="https://tc39.github.io/ecma262/#sec-toobject">ToObject</a></emu-xref>(<var>options</var>).</li><li>Let <var>options</var> be <emu-xref aoid="ObjectCreate" id="_ref_300"><a href="https://tc39.github.io/ecma262/#sec-objectcreate">ObjectCreate</a></emu-xref>(<var>options</var>).</li><li>Let <var>needDefaults</var> be <emu-val>true</emu-val>.</li><li>If <var>required</var> is <code>"date"</code> or <code>"any"</code>, then<ol><li>For each of the property names <code>"weekday"</code>, <code>"year"</code>, <code>"month"</code>, <code>"day"</code>, do<ol><li>Let <var>prop</var> be the property name.</li><li>Let <var>value</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_301"><a href="https://tc39.github.io/ecma262/#sec-get-o-p">Get</a></emu-xref>(<var>options</var>, <var>prop</var>).</li><li>If <var>value</var> is not <emu-val>undefined</emu-val>, let <var>needDefaults</var> be <emu-val>false</emu-val>.</li></ol></li></ol></li><li>If <var>required</var> is <code>"time"</code> or <code>"any"</code>, then<ol><li>For each of the property names <code>"hour"</code>, <code>"minute"</code>, <code>"second"</code>, do<ol><li>Let <var>prop</var> be the property name.</li><li>Let <var>value</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_302"><a href="https://tc39.github.io/ecma262/#sec-get-o-p">Get</a></emu-xref>(<var>options</var>, <var>prop</var>).</li><li>If <var>value</var> is not <emu-val>undefined</emu-val>, let <var>needDefaults</var> be <emu-val>false</emu-val>.</li></ol></li></ol></li><li>If <var>needDefaults</var> is <emu-val>true</emu-val> and <var>defaults</var> is either <code>"date"</code> or <code>"all"</code>, then<ol><li>For each of the property names <code>"year"</code>, <code>"month"</code>, <code>"day"</code>, do<ol><li>Perform ?&nbsp;<emu-xref aoid="CreateDataPropertyOrThrow" id="_ref_303"><a href="https://tc39.github.io/ecma262/#sec-createdatapropertyorthrow">CreateDataPropertyOrThrow</a></emu-xref>(<var>options</var>, <var>prop</var>, <code>"numeric"</code>).</li></ol></li></ol></li><li>If <var>needDefaults</var> is <emu-val>true</emu-val> and <var>defaults</var> is either <code>"time"</code> or <code>"all"</code>, then<ol><li>For each of the property names <code>"hour"</code>, <code>"minute"</code>, <code>"second"</code>, do<ol><li>Perform ?&nbsp;<emu-xref aoid="CreateDataPropertyOrThrow" id="_ref_304"><a href="https://tc39.github.io/ecma262/#sec-createdatapropertyorthrow">CreateDataPropertyOrThrow</a></emu-xref>(<var>options</var>, <var>prop</var>, <code>"numeric"</code>).</li></ol></li></ol></li><li>Return <var>options</var>.
      </li></ol></emu-alg>
    </emu-clause>

    <emu-clause id="sec-basicformatmatcher" aoid="BasicFormatMatcher">
      <h1><span class="secnum">12.1.3</span>BasicFormatMatcher ( <var>options</var>, <var>formats</var> )</h1>

      <p>
        When the BasicFormatMatcher abstract operation is called with two arguments <var>options</var> and <var>formats</var>, the following steps are taken:

      </p>

      <emu-alg><ol><li>Let <var>removalPenalty</var> be 120.</li><li>Let <var>additionPenalty</var> be 20.</li><li>Let <var>longLessPenalty</var> be 8.</li><li>Let <var>longMorePenalty</var> be 6.</li><li>Let <var>shortLessPenalty</var> be 6.</li><li>Let <var>shortMorePenalty</var> be 3.</li><li>Let <var>bestScore</var> be -<emu-val>Infinity</emu-val>.</li><li>Let <var>bestFormat</var> be <emu-val>undefined</emu-val>.</li><li>Assert: <emu-xref aoid="Type" id="_ref_305"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>formats</var>) is <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>For each element <var>format</var> of <var>formats</var> in <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">List</a></emu-xref> order, do<ol><li>Let <var>score</var> be 0.</li><li>For each <var>property</var> shown in <emu-xref href="#table-datetimeformat-components" id="_ref_52"><a href="#table-datetimeformat-components">Table 5</a></emu-xref>, do<ol><li>Let <var>optionsProp</var> be <var>options</var>.[[&lt;<var>property</var>&gt;]].</li><li>Let <var>formatProp</var> be <var>format</var>.[[&lt;<var>property</var>&gt;]].</li><li>If <var>optionsProp</var> is <emu-val>undefined</emu-val> and <var>formatProp</var> is not <emu-val>undefined</emu-val>, then decrease <var>score</var> by <var>additionPenalty</var>.</li><li>Else if <var>optionsProp</var> is not <emu-val>undefined</emu-val> and <var>formatProp</var> is <emu-val>undefined</emu-val>, then decrease <var>score</var> by <var>removalPenalty</var>.</li><li>Else if <var>optionsProp</var> ≠ <var>formatProp</var>,<ol><li>Let <var>values</var> be « <code>"2-digit"</code>, <code>"numeric"</code>, <code>"narrow"</code>, <code>"short"</code>, <code>"long"</code> ».</li><li>Let <var>optionsPropIndex</var> be the index of <var>optionsProp</var> within <var>values</var>.</li><li>Let <var>formatPropIndex</var> be the index of <var>formatProp</var> within <var>values</var>.</li><li>Let <var>delta</var> be <emu-xref aoid="max"><a href="https://tc39.github.io/ecma262/#sec-algorithm-conventions">max</a></emu-xref>(<emu-xref aoid="min"><a href="https://tc39.github.io/ecma262/#sec-algorithm-conventions">min</a></emu-xref>(<var>formatPropIndex</var> - <var>optionsPropIndex</var>, 2), -2).</li><li>If <var>delta</var> = 2, decrease <var>score</var> by <var>longMorePenalty</var>.</li><li>Else if <var>delta</var> = 1, decrease <var>score</var> by <var>shortMorePenalty</var>.</li><li>Else if <var>delta</var> = -1, decrease <var>score</var> by <var>shortLessPenalty</var>.</li><li>Else if <var>delta</var> = -2, decrease <var>score</var> by <var>longLessPenalty</var>.</li></ol></li></ol></li><li>If <var>score</var> &gt; <var>bestScore</var>, then<ol><li>Let <var>bestScore</var> be <var>score</var>.</li><li>Let <var>bestFormat</var> be <var>format</var>.</li></ol></li></ol></li><li>Return <var>bestFormat</var>.
      </li></ol></emu-alg>
    </emu-clause>

    <emu-clause id="sec-bestfitformatmatcher" aoid="BestFitFormatMatcher">
      <h1><span class="secnum">12.1.4</span>BestFitFormatMatcher ( <var>options</var>, <var>formats</var> )</h1>

      <p>
        When the BestFitFormatMatcher abstract operation is called with two arguments <var>options</var> and <var>formats</var>, it performs implementation dependent steps, which should return a set of component representations that a typical user of the selected locale would perceive as at least as good as the one returned by <emu-xref aoid="BasicFormatMatcher" id="_ref_306"><a href="#sec-basicformatmatcher">BasicFormatMatcher</a></emu-xref>.

      </p>
    </emu-clause>

    <emu-clause id="sec-datetime-format-functions">
      <h1><span class="secnum">12.1.5</span>DateTime Format Functions</h1>

      <p>A DateTime format function is an anonymous built-in function that has a [[DateTimeFormat]] internal slot.</p>
      <p>When a DateTime format function <var>F</var> is called with optional argument <var>date</var>, the following steps are taken:</p>

      <emu-alg><ol><li>Let <var>dtf</var> be <var>F</var>.[[DateTimeFormat]].</li><li>Assert: <emu-xref aoid="Type" id="_ref_307"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>dtf</var>) is Object and <var>dtf</var> has an [[InitializedDateTimeFormat]] internal slot.</li><li>If <var>date</var> is not provided or is <emu-val>undefined</emu-val>, then<ol><li>Let <var>x</var> be <emu-xref aoid="Call" id="_ref_308"><a href="https://tc39.github.io/ecma262/#sec-call">Call</a></emu-xref>(<emu-xref href="#sec-402-well-known-intrinsic-objects" id="_ref_309"><a href="#sec-402-well-known-intrinsic-objects">%Date_now%</a></emu-xref>, <emu-val>undefined</emu-val>).</li></ol></li><li>Else,<ol><li>Let <var>x</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_310"><a href="https://tc39.github.io/ecma262/#sec-tonumber">ToNumber</a></emu-xref>(<var>date</var>).</li></ol></li><li>Return <emu-xref aoid="FormatDateTime" id="_ref_311"><a href="#sec-formatdatetime">FormatDateTime</a></emu-xref>(<var>dtf</var>, <var>x</var>).
      </li></ol></emu-alg>

      <p>
        The <code>length</code> property of a DateTime format function is 1.

      </p>
    </emu-clause>

    <emu-clause id="sec-partitiondatetimepattern" aoid="PartitionDateTimePattern">
      <h1><span class="secnum">12.1.6</span>PartitionDateTimePattern ( <var>dateTimeFormat</var>, <var>x</var> )</h1>

      <p>
        The PartitionDateTimePattern abstract operation is called with arguments <var>dateTimeFormat</var> (which must be an object initialized as a DateTimeFormat) and <var>x</var> (which must be a Number value), interprets <var>x</var> as a <emu-xref href="#sec-time-values-and-time-range"><a href="https://tc39.github.io/ecma262/#sec-time-values-and-time-range">time value</a></emu-xref> as specified in ES2015,  <emu-xref href="#sec-time-values-and-time-range"><a href="https://tc39.github.io/ecma262/#sec-time-values-and-time-range">20.3.1.1</a></emu-xref>, and creates the corresponding parts according to the effective locale and the formatting options of <var>dateTimeFormat</var>. The following steps are taken:

      </p>

      <emu-alg><ol><li>Let <var>x</var> be <emu-xref aoid="TimeClip" id="_ref_312"><a href="https://tc39.github.io/ecma262/#sec-timeclip">TimeClip</a></emu-xref>(<var>x</var>).</li><li>If <var>x</var> is <emu-val>NaN</emu-val>, throw a <emu-val>RangeError</emu-val> exception.</li><li>Let <var>locale</var> be <var>dateTimeFormat</var>.[[Locale]].</li><li>Let <var>nfOptions</var> be <emu-xref aoid="ObjectCreate" id="_ref_313"><a href="https://tc39.github.io/ecma262/#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-val>null</emu-val>).</li><li>Perform !&nbsp;<emu-xref aoid="CreateDataPropertyOrThrow" id="_ref_314"><a href="https://tc39.github.io/ecma262/#sec-createdatapropertyorthrow">CreateDataPropertyOrThrow</a></emu-xref>(<var>nfOptions</var>, <code>"useGrouping"</code>, <emu-val>false</emu-val>).</li><li>Let <var>nf</var> be ?&nbsp;<emu-xref aoid="Construct" id="_ref_315"><a href="https://tc39.github.io/ecma262/#sec-construct">Construct</a></emu-xref>(<emu-xref href="#sec-intl-numberformat-constructor" id="_ref_316"><a href="#sec-intl-numberformat-constructor">%NumberFormat%</a></emu-xref>, « <var>locale</var>, <var>nfOptions</var> »).</li><li>Let <var>nf2Options</var> be <emu-xref aoid="ObjectCreate" id="_ref_317"><a href="https://tc39.github.io/ecma262/#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-val>null</emu-val>).</li><li>Perform !&nbsp;<emu-xref aoid="CreateDataPropertyOrThrow" id="_ref_318"><a href="https://tc39.github.io/ecma262/#sec-createdatapropertyorthrow">CreateDataPropertyOrThrow</a></emu-xref>(<var>nf2Options</var>, <code>"minimumIntegerDigits"</code>, 2).</li><li>Perform !&nbsp;<emu-xref aoid="CreateDataPropertyOrThrow" id="_ref_319"><a href="https://tc39.github.io/ecma262/#sec-createdatapropertyorthrow">CreateDataPropertyOrThrow</a></emu-xref>(<var>nf2Options</var>, <code>"useGrouping"</code>, <emu-val>false</emu-val>).</li><li>Let <var>nf2</var> be ?&nbsp;<emu-xref aoid="Construct" id="_ref_320"><a href="https://tc39.github.io/ecma262/#sec-construct">Construct</a></emu-xref>(<emu-xref href="#sec-intl-numberformat-constructor" id="_ref_321"><a href="#sec-intl-numberformat-constructor">%NumberFormat%</a></emu-xref>, « <var>locale</var>, <var>nf2Options</var> »).</li><li>Let <var>tm</var> be <emu-xref aoid="ToLocalTime" id="_ref_322"><a href="#sec-tolocaltime">ToLocalTime</a></emu-xref>(<var>x</var>, <var>dateTimeFormat</var>.[[Calendar]], <var>dateTimeFormat</var>.[[TimeZone]]).</li><li>Let <var>pattern</var> be <var>dateTimeFormat</var>.[[Pattern]].</li><li>Let <var>result</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Let <var>beginIndex</var> be <emu-xref aoid="Call" id="_ref_323"><a href="https://tc39.github.io/ecma262/#sec-call">Call</a></emu-xref>(<emu-xref href="#sec-402-well-known-intrinsic-objects" id="_ref_324"><a href="#sec-402-well-known-intrinsic-objects">%StringProto_indexOf%</a></emu-xref>, <var>pattern</var>, « <code>"{"</code>, 0 »).</li><li>Let <var>endIndex</var> be 0.</li><li>Let <var>nextIndex</var> be 0.</li><li>Let <var>length</var> be the number of code units in <var>pattern</var>.</li><li>Repeat, while <var>beginIndex</var> is an integer index into <var>pattern</var><ol><li>Set <var>endIndex</var> to <emu-xref aoid="Call" id="_ref_325"><a href="https://tc39.github.io/ecma262/#sec-call">Call</a></emu-xref>(<emu-xref href="#sec-402-well-known-intrinsic-objects" id="_ref_326"><a href="#sec-402-well-known-intrinsic-objects">%StringProto_indexOf%</a></emu-xref>, <var>pattern</var>, « <code>"}"</code>, <var>beginIndex</var> »).</li><li>Assert: <var>endIndex</var> is greater than <var>beginIndex</var>.</li><li>If <var>beginIndex</var> is greater than <var>nextIndex</var>, then<ol><li>Let <var>literal</var> be a substring of <var>pattern</var> from position <var>nextIndex</var>, inclusive, to position <var>beginIndex</var>, exclusive.</li><li>Add new part record { [[Type]]: <code>"literal"</code>, [[Value]]: <var>literal</var> } as a new element of the list <var>result</var>.</li></ol></li><li>Let <var>p</var> be the substring of <var>pattern</var> from position <var>beginIndex</var>, exclusive, to position <var>endIndex</var>, exclusive.</li><li>If <var>p</var> matches a Property column of the row in <emu-xref href="#table-datetimeformat-components" id="_ref_53"><a href="#table-datetimeformat-components">Table 5</a></emu-xref>, then<ol><li>Let <var>f</var> be the value of <var>dateTimeFormat</var>'s internal slot whose name is the Internal Slot column of the matching row.</li><li>Let <var>v</var> be the value of <var>tm</var>'s field whose name is the Internal Slot column of the matching row.</li><li>If <var>p</var> is <code>"year"</code> and <var>v</var> ≤ 0, let <var>v</var> be 1 - <var>v</var>.</li><li>If <var>p</var> is <code>"month"</code>, increase <var>v</var> by 1.</li><li>If <var>p</var> is <code>"hour"</code> and <var>dateTimeFormat</var>.[[HourCycle]] is <code>"h11"</code> or <code>"h12"</code>, then<ol><li>Let <var>v</var> be <var>v</var> <emu-xref aoid="modulo"><a href="https://tc39.github.io/ecma262/#sec-algorithm-conventions">modulo</a></emu-xref> 12.</li><li>If <var>v</var> is 0 and <var>dateTimeFormat</var>.[[HourCycle]] is <code>"h12"</code>, let <var>v</var> be 12.</li></ol></li><li>If <var>p</var> is <code>"hour"</code> and <var>dateTimeFormat</var>.[[HourCycle]] is <code>"h24"</code>, then<ol><li>If <var>v</var> is 0, let <var>v</var> be 24.</li></ol></li><li>If <var>f</var> is <code>"numeric"</code>, then<ol><li>Let <var>fv</var> be <emu-xref aoid="FormatNumber" id="_ref_327"><a href="#sec-formatnumber">FormatNumber</a></emu-xref>(<var>nf</var>, <var>v</var>).</li></ol></li><li>Else if <var>f</var> is <code>"2-digit"</code>, then<ol><li>Let <var>fv</var> be <emu-xref aoid="FormatNumber" id="_ref_328"><a href="#sec-formatnumber">FormatNumber</a></emu-xref>(<var>nf2</var>, <var>v</var>).</li><li>If the <code>length</code> property of <var>fv</var> is greater than 2, let <var>fv</var> be the substring of <var>fv</var> containing the last two characters.</li></ol></li><li>Else if <var>f</var> is <code>"narrow"</code>, <code>"short"</code>, or <code>"long"</code>, then let <var>fv</var> be a String value representing <var>f</var> in the desired form; the String value depends upon the implementation and the effective locale and calendar of <var>dateTimeFormat</var>. If <var>p</var> is <code>"month"</code>, then the String value may also depend on whether <var>dateTimeFormat</var> has a [[Day]] internal slot. If <var>p</var> is <code>"timeZoneName"</code>, then the String value may also depend on the value of the [[inDST]] field of <var>tm</var>. If <var>p</var> is <code>"era"</code>, then the String value may also depend on whether <var>dateTimeFormat</var> has a [[Era]] internal slot and if the implementation does not have a localized representation of <var>f</var>, then use <var>f</var> itself.</li><li>Add new part record { [[Type]]: <var>p</var>, [[Value]]: <var>fv</var> } as a new element of the list <var>result</var>.</li></ol></li><li>Else if <var>p</var> is equal to <code>"ampm"</code>, then<ol><li>Let <var>v</var> be <var>tm</var>.[[hour]].</li><li>If <var>v</var> is greater than 11, then<ol><li>Let <var>fv</var> be an implementation and locale dependent String value representing <code>"post meridiem"</code>.</li></ol></li><li>Else,<ol><li>Let <var>fv</var> be an implementation and locale dependent String value representing <code>"ante meridiem"</code>.</li></ol></li><li>Add new part record { [[Type]]: <code>"dayPeriod"</code>, [[Value]]: <var>fv</var> } as a new element of the list <var>result</var>.</li></ol></li><li>Else,<ol><li>Let <var>unknown</var> be an implementation-, locale-, and numbering system-dependent String based on <var>x</var> and <var>p</var>.</li><li>Append a new <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref> { [[Type]]: <code>"unknown"</code>, [[Value]]: <var>unknown</var> } as the last element of <var>result</var>.</li></ol></li><li>Set <var>nextIndex</var> to <var>endIndex</var> + 1.</li><li>Set <var>beginIndex</var> to <emu-xref aoid="Call" id="_ref_329"><a href="https://tc39.github.io/ecma262/#sec-call">Call</a></emu-xref>(<emu-xref href="#sec-402-well-known-intrinsic-objects" id="_ref_330"><a href="#sec-402-well-known-intrinsic-objects">%StringProto_indexOf%</a></emu-xref>, <var>pattern</var>, « <code>"{"</code>, <var>nextIndex</var> »).</li></ol></li><li>If <var>nextIndex</var> is less than <var>length</var>, then<ol><li>Let <var>literal</var> be the substring of <var>pattern</var> from position <var>nextIndex</var>, exclusive, to position <var>length</var>, exclusive.</li><li>Add new part record { [[Type]]: <code>"literal"</code>, [[Value]]: <var>literal</var> } as a new element of the list <var>result</var>.</li></ol></li><li>Return <var>result</var>.
      </li></ol></emu-alg>

      <emu-note><span class="note">Note 1</span><div class="note-contents">
        It is recommended that implementations use the locale and calendar dependent strings provided by the Common Locale Data Repository (available at  <a href="http://cldr.unicode.org/">http://cldr.unicode.org/</a>), and use CLDR <code>"abbreviated"</code> strings for DateTimeFormat <code>"short"</code> strings, and CLDR <code>"wide"</code> strings for DateTimeFormat <code>"long"</code> strings.

      </div></emu-note>

      <emu-note><span class="note">Note 2</span><div class="note-contents">
        It is recommended that implementations use the time zone information of the IANA Time Zone Database.

      </div></emu-note>

    </emu-clause>

    <emu-clause id="sec-formatdatetime" aoid="FormatDateTime">
      <h1><span class="secnum">12.1.7</span>FormatDateTime( <var>dateTimeFormat</var>, <var>x</var> )</h1>

      <p>
        The FormatDateTime abstract operation is called with arguments <var>dateTimeFormat</var> (which must be an object initialized as a DateTimeFormat) and <var>x</var> (which must be a Number value), and performs the following steps:

      </p>

      <emu-alg><ol><li>Let <var>parts</var> be ?&nbsp;<emu-xref aoid="PartitionDateTimePattern" id="_ref_331"><a href="#sec-partitiondatetimepattern">PartitionDateTimePattern</a></emu-xref>(<var>dateTimeFormat</var>, <var>x</var>).</li><li>Let <var>result</var> be the empty String.</li><li>For each <var>part</var> in <var>parts</var>, do<ol><li>Set <var>result</var> to a String value produced by concatenating <var>result</var> and <var>part</var>.[[Value]].</li></ol></li><li>Return <var>result</var>.
      </li></ol></emu-alg>

    </emu-clause>

    <emu-clause id="sec-formatdatetimetoparts" aoid="FormatDateTimeToParts">
      <h1><span class="secnum">12.1.8</span>FormatDateTimeToParts ( <var>dateTimeFormat</var>, <var>x</var> )</h1>

      <p>
        The FormatDateTimeToParts abstract operation is called with arguments <var>dateTimeFormat</var> (which must be an object initialized as a DateTimeFormat) and <var>x</var> (which must be a Number value), and performs the following steps:

      </p>

      <emu-alg><ol><li>Let <var>parts</var> be ?&nbsp;<emu-xref aoid="PartitionDateTimePattern" id="_ref_332"><a href="#sec-partitiondatetimepattern">PartitionDateTimePattern</a></emu-xref>(<var>dateTimeFormat</var>, <var>x</var>).</li><li>Let <var>result</var> be <emu-xref aoid="ArrayCreate" id="_ref_333"><a href="https://tc39.github.io/ecma262/#sec-arraycreate">ArrayCreate</a></emu-xref>(0).</li><li>Let <var>n</var> be 0.</li><li>For each <var>part</var> in <var>parts</var>, do<ol><li>Let <var>O</var> be <emu-xref aoid="ObjectCreate" id="_ref_334"><a href="https://tc39.github.io/ecma262/#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-xref href="#sec-properties-of-the-object-prototype-object"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>).</li><li>Perform !&nbsp;<emu-xref aoid="CreateDataPropertyOrThrow" id="_ref_335"><a href="https://tc39.github.io/ecma262/#sec-createdatapropertyorthrow">CreateDataPropertyOrThrow</a></emu-xref>(<var>O</var>, <code>"type"</code>, <var>part</var>.[[Type]]).</li><li>Perform !&nbsp;<emu-xref aoid="CreateDataPropertyOrThrow" id="_ref_336"><a href="https://tc39.github.io/ecma262/#sec-createdatapropertyorthrow">CreateDataPropertyOrThrow</a></emu-xref>(<var>O</var>, <code>"value"</code>, <var>part</var>.[[Value]]).</li><li>Perform !&nbsp;<emu-xref aoid="CreateDataProperty" id="_ref_337"><a href="https://tc39.github.io/ecma262/#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>result</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_338"><a href="https://tc39.github.io/ecma262/#sec-tostring">ToString</a></emu-xref>(<var>n</var>), <var>O</var>).</li><li>Increment <var>n</var> by 1.</li></ol></li><li>Return <var>result</var>.
      </li></ol></emu-alg>

    </emu-clause>

    <emu-clause id="sec-tolocaltime" aoid="ToLocalTime">
      <h1><span class="secnum">12.1.9</span>ToLocalTime ( <var>date</var>, <var>calendar</var>, <var>timeZone</var> )</h1>

      <p>
        When the ToLocalTime abstract operation is called with arguments <var>date</var>, <var>calendar</var>, and <var>timeZone</var>, the following steps are taken:

      </p>

      <emu-alg><ol><li>Apply calendrical calculations on <var>date</var> for the given <var>calendar</var> and <var>timeZone</var> to produce weekday, era, year, month, day, hour, minute, second, and inDST values. The calculations should use best available information about the specified <var>calendar</var> and <var>timeZone</var>, including current and historical information about time zone offsets from UTC and daylight saving time rules. If the <var>calendar</var> is <code>"gregory"</code>, then the calculations must match the algorithms specified in ES2019, <emu-xref href="#sec-overview-of-date-objects-and-definitions-of-abstract-operations"><a href="https://tc39.github.io/ecma262/#sec-overview-of-date-objects-and-definitions-of-abstract-operations">20.3.1</a></emu-xref>.</li><li>Return a <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref> with fields [[weekday]], [[era]], [[year]], [[month]], [[day]], [[hour]], [[minute]], [[second]], and [[inDST]], each with the corresponding calculated value.
      </li></ol></emu-alg>

      <emu-note><span class="note">Note</span><div class="note-contents">
        It is recommended that implementations use the time zone information of the IANA Time Zone Database.

      </div></emu-note>
    </emu-clause>

    <emu-clause id="sec-unwrapdatetimeformat" aoid="UnwrapDateTimeFormat">
      <h1><span class="secnum">12.1.10</span>UnwrapDateTimeFormat( <var>dtf</var> )</h1>
      <p>
        The UnwrapDateTimeFormat abstract operation gets the underlying DateTimeFormat operation
        for various methods which implement ECMA-402 v1 semantics for supporting initializing
        existing Intl objects.

      </p>
      <emu-alg><ol><li>Assert: <emu-xref aoid="Type" id="_ref_339"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>dtf</var>) is Object.
      </li></ol></emu-alg>
      <emu-normative-optional>
      <emu-alg><ol start="2"><li>If <var>dtf</var> does not have an [[InitializedDateTimeFormat]] internal slot and ?&nbsp;<emu-xref aoid="InstanceofOperator" id="_ref_340"><a href="https://tc39.github.io/ecma262/#sec-instanceofoperator">InstanceofOperator</a></emu-xref>(<var>dtf</var>, <emu-xref href="#sec-intl-datetimeformat-constructor" id="_ref_341"><a href="#sec-intl-datetimeformat-constructor">%DateTimeFormat%</a></emu-xref>) is <emu-val>true</emu-val>, then<ol><li>Let <var>dtf</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_342"><a href="https://tc39.github.io/ecma262/#sec-get-o-p">Get</a></emu-xref>(<var>dtf</var>, <emu-xref href="#intl-object" id="_ref_343"><a href="#intl-object">%Intl%</a></emu-xref>.[[FallbackSymbol]]).
      </li></ol></li></ol></emu-alg>
      </emu-normative-optional>
      <emu-alg><ol start="2"><li>If <emu-xref aoid="Type" id="_ref_344"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>dtf</var>) is not Object or <var>dtf</var> does not have an [[InitializedDateTimeFormat]] internal slot, then<ol><li>Throw a <emu-val>TypeError</emu-val> exception.</li></ol></li><li>Return <var>dtf</var>.
      </li></ol></emu-alg>
      <emu-note><span class="note">Note</span><div class="note-contents">See  <emu-xref href="#legacy-constructor" id="_ref_54"><a href="#legacy-constructor">8.1 Note 1</a></emu-xref> for the motivation of the normative optional text.</div></emu-note>
    </emu-clause>
  </emu-clause>

  <emu-clause id="sec-intl-datetimeformat-constructor">
    <h1><span class="secnum">12.2</span>The Intl.DateTimeFormat Constructor</h1>

    <p>
      The Intl.DateTimeFormat constructor is the  <dfn>%DateTimeFormat%</dfn> intrinsic object and a standard built-in property of the Intl object. Behaviour common to all service constructor properties of the Intl object is specified in  <emu-xref href="#sec-internal-slots" id="_ref_55"><a href="#sec-internal-slots">9.1</a></emu-xref>.

    </p>

    <emu-clause id="sec-intl.datetimeformat">
      <h1><span class="secnum">12.2.1</span>Intl.DateTimeFormat ( [ <var>locales</var> [ , <var>options</var> ] ] )</h1>

      <p>
        When the <code>Intl.DateTimeFormat</code> function is called with optional arguments <var>locales</var> and <var>options</var>, the following steps are taken:

      </p>

      <emu-alg><ol><li>If NewTarget is <emu-val>undefined</emu-val>, let <var>newTarget</var> be the <emu-xref href="#active-function-object"><a href="https://tc39.github.io/ecma262/#active-function-object">active function object</a></emu-xref>, else let <var>newTarget</var> be NewTarget.</li><li>Let <var>dateTimeFormat</var> be ?&nbsp;<emu-xref aoid="OrdinaryCreateFromConstructor" id="_ref_345"><a href="https://tc39.github.io/ecma262/#sec-ordinarycreatefromconstructor">OrdinaryCreateFromConstructor</a></emu-xref>(<var>newTarget</var>, <code>"%DateTimeFormatPrototype%"</code>, « [[InitializedDateTimeFormat]], [[Locale]], [[Calendar]], [[NumberingSystem]], [[TimeZone]], [[Weekday]], [[Era]], [[Year]], [[Month]], [[Day]], [[Hour]], [[Minute]], [[Second]], [[TimeZoneName]], [[HourCycle]], [[Pattern]], [[BoundFormat]] »).</li><li>Perform ?&nbsp;<emu-xref aoid="InitializeDateTimeFormat" id="_ref_346"><a href="#sec-initializedatetimeformat">InitializeDateTimeFormat</a></emu-xref>(<var>dateTimeFormat</var>, <var>locales</var>, <var>options</var>).
      </li></ol></emu-alg>
      <emu-normative-optional>
      <emu-alg><ol start="4"><li>Let <var>this</var> be the <emu-val>this</emu-val> value.</li><li>If NewTarget is <emu-val>undefined</emu-val> and ?&nbsp;<emu-xref aoid="InstanceofOperator" id="_ref_347"><a href="https://tc39.github.io/ecma262/#sec-instanceofoperator">InstanceofOperator</a></emu-xref>(<var>this</var>, <emu-xref href="#sec-intl-datetimeformat-constructor" id="_ref_348"><a href="#sec-intl-datetimeformat-constructor">%DateTimeFormat%</a></emu-xref>) is <emu-val>true</emu-val>, then<ol><li>Perform ?&nbsp;<emu-xref aoid="DefinePropertyOrThrow" id="_ref_349"><a href="https://tc39.github.io/ecma262/#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>this</var>, <emu-xref href="#intl-object" id="_ref_350"><a href="#intl-object">%Intl%</a></emu-xref>.[[FallbackSymbol]], PropertyDescriptor{ [[Value]]: <var>dateTimeFormat</var>, [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }).</li><li>Return <var>this</var>.
      </li></ol></li></ol></emu-alg>
      </emu-normative-optional>
      <emu-alg><ol start="6"><li>Return <var>dateTimeFormat</var>.
      </li></ol></emu-alg>
      <emu-note><span class="note">Note</span><div class="note-contents">See  <emu-xref href="#legacy-constructor" id="_ref_56"><a href="#legacy-constructor">8.1 Note 1</a></emu-xref> for the motivation of the normative optional text.</div></emu-note>
    </emu-clause>
  </emu-clause>

  <emu-clause id="sec-properties-of-intl-datetimeformat-constructor">
    <h1><span class="secnum">12.3</span>Properties of the Intl.DateTimeFormat Constructor</h1>

    <p>
      The Intl.DateTimeFormat constructor has the following properties:

    </p>

    <emu-clause id="sec-intl.datetimeformat.prototype">
      <h1><span class="secnum">12.3.1</span>Intl.DateTimeFormat.prototype</h1>

      <p>
        The value of <code>Intl.DateTimeFormat.prototype</code> is <emu-xref href="#sec-properties-of-intl-datetimeformat-prototype-object" id="_ref_351"><a href="#sec-properties-of-intl-datetimeformat-prototype-object">%DateTimeFormatPrototype%</a></emu-xref>.

      </p>
      <p>
        This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.

      </p>
    </emu-clause>

    <emu-clause id="sec-intl.datetimeformat.supportedlocalesof">
      <h1><span class="secnum">12.3.2</span>Intl.DateTimeFormat.supportedLocalesOf ( <var>locales</var> [ , <var>options</var> ] )</h1>

      <p>
        When the <code>supportedLocalesOf</code> method is called with arguments <var>locales</var> and <var>options</var>, the following steps are taken:

      </p>

      <emu-alg><ol><li>Let <var>availableLocales</var> be <emu-xref href="#sec-intl-datetimeformat-constructor" id="_ref_352"><a href="#sec-intl-datetimeformat-constructor">%DateTimeFormat%</a></emu-xref>.[[AvailableLocales]].</li><li>Let <var>requestedLocales</var> be ?&nbsp;<emu-xref aoid="CanonicalizeLocaleList" id="_ref_353"><a href="#sec-canonicalizelocalelist">CanonicalizeLocaleList</a></emu-xref>(<var>locales</var>).</li><li>Return ?&nbsp;<emu-xref aoid="SupportedLocales" id="_ref_354"><a href="#sec-supportedlocales">SupportedLocales</a></emu-xref>(<var>availableLocales</var>, <var>requestedLocales</var>, <var>options</var>).
      </li></ol></emu-alg>

      <p>
        The value of the <code>length</code> property of the <emu-val>supportedLocalesOf</emu-val> method is 1.

      </p>
    </emu-clause>

    <emu-clause id="sec-intl.datetimeformat-internal-slots">
      <h1><span class="secnum">12.3.3</span>Internal slots</h1>

      <p>
        The value of the [[AvailableLocales]] internal slot is implementation defined within the constraints described in  <emu-xref href="#sec-internal-slots" id="_ref_57"><a href="#sec-internal-slots">9.1</a></emu-xref>.

      </p>

      <p>
        The value of the [[RelevantExtensionKeys]] internal slot is « <code>"ca"</code>, <code>"nu"</code>, <code>"hc"</code> ».

      </p>

      <emu-note><span class="note">Note 1</span><div class="note-contents">
        Unicode Technical Standard 35 describes three locale extension keys that are relevant to date and time formatting, <code>"ca"</code> for calendar, <code>"tz"</code> for time zone, <code>"hc"</code> for hour cycle, and implicitly <code>"nu"</code> for the numbering system of the number format used for numbers within the date format. DateTimeFormat, however, requires that the time zone is specified through the timeZone property in the options objects.

      </div></emu-note>

      <p>
        The value of the [[LocaleData]] internal slot is implementation defined within the constraints described in  <emu-xref href="#sec-internal-slots" id="_ref_58"><a href="#sec-internal-slots">9.1</a></emu-xref> and the following additional constraints:

      </p>

      <ul>
        <li>
          The list that is the value of the <code>"nu"</code> field of any locale field of [[LocaleData]] must not include the values <code>"native"</code>, <code>"traditio"</code>, or <code>"finance"</code>.

        </li>
        <li>
          [[LocaleData]][locale].hc must be « <emu-val>null</emu-val>, <code>"h11"</code>, <code>"h12"</code>, <code>"h23"</code>, <code>"h24"</code> » for all locale values.

        </li>
        <li>
          [[LocaleData]][locale] must have a hourCycle field with a String value equal to <code>"h11"</code>, <code>"h12"</code>, <code>"h23"</code>, or <code>"h24"</code> for all locale values.

        </li>
        <li>
          [[LocaleData]][locale] must have a formats field for all locale values. The value of this field must be a list of records, each of which has a subset of the fields shown in  <emu-xref href="#table-datetimeformat-components" id="_ref_59"><a href="#table-datetimeformat-components">Table 5</a></emu-xref>, where each field must have one of the values specified for the field in  <emu-xref href="#table-datetimeformat-components" id="_ref_60"><a href="#table-datetimeformat-components">Table 5</a></emu-xref>. Multiple records in a list may use the same subset of the fields as long as they have different values for the fields. The following subsets must be available for each locale:

          <ul>
            <li>weekday, year, month, day, hour, minute, second</li>
            <li>weekday, year, month, day</li>
            <li>year, month, day</li>
            <li>year, month</li>
            <li>month, day</li>
            <li>hour, minute, second</li>
            <li>hour, minute</li>
          </ul>
          Each of the records must also have a pattern field, whose value is a String value that contains for each of the date and time format component fields of the record a substring starting with <code>"{"</code>, followed by the name of the field, followed by <code>"}"</code>. If the record has an hour field, it must also have a pattern12 field, whose value is a String value that, in addition to the substrings of the pattern field, contains a substring <code>"{ampm}"</code>.

        </li>
      </ul>

      <p>
        EXAMPLE     An implementation might include the following record as part of its English locale data: {[[hour]]: <code>"numeric"</code>, [[minute]]: <code>"2-digit"</code>, [[second]]: <code>"2-digit"</code>, [[pattern]]: <code>"{hour}:{minute}:{second}"</code>, [[pattern12]]: <code>"{hour}:{minute}:{second} {ampm}"</code>}.

      </p>

      <emu-note><span class="note">Note 2</span><div class="note-contents">
        It is recommended that implementations use the locale data provided by the Common Locale Data Repository (available at  <a href="http://cldr.unicode.org/">http://cldr.unicode.org/</a>).

      </div></emu-note>
    </emu-clause>
  </emu-clause>

  <emu-clause id="sec-properties-of-intl-datetimeformat-prototype-object">
    <h1><span class="secnum">12.4</span>Properties of the Intl.DateTimeFormat Prototype Object</h1>

    <p>
      The Intl.DateTimeFormat prototype object is itself an ordinary object.  <dfn>%DateTimeFormatPrototype%</dfn> is not an Intl.DateTimeFormat instance and does not have an [[InitializedDateTimeFormat]] internal slot or any of the other internal slots of Intl.DateTimeFormat instance objects.

    </p>

    <emu-clause id="sec-intl.datetimeformat.prototype.constructor">
      <h1><span class="secnum">12.4.1</span>Intl.DateTimeFormat.prototype.constructor</h1>

      <p>
        The initial value of <code>Intl.DateTimeFormat.prototype.constructor</code> is the intrinsic object <emu-xref href="#sec-intl-datetimeformat-constructor" id="_ref_355"><a href="#sec-intl-datetimeformat-constructor">%DateTimeFormat%</a></emu-xref>.

      </p>
    </emu-clause>

    <emu-clause id="sec-intl.datetimeformat.prototype-@@tostringtag">
      <h1><span class="secnum">12.4.2</span>Intl.DateTimeFormat.prototype [ @@toStringTag ]</h1>

      <p>
        The initial value of the @@toStringTag property is the string value <code>"Object"</code>.

      </p>

      <p>
        This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.

      </p>
    </emu-clause>

    <emu-clause id="sec-intl.datetimeformat.prototype.format">
      <h1><span class="secnum">12.4.3</span>get Intl.DateTimeFormat.prototype.format</h1>

      <p>
        Intl.DateTimeFormat.prototype.format is an accessor property whose set accessor function is <emu-val>undefined</emu-val>. Its get accessor function performs the following steps:

      </p>

      <emu-alg><ol><li>Let <var>dtf</var> be <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_356"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>dtf</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>dtf</var> be ?&nbsp;<emu-xref aoid="UnwrapDateTimeFormat" id="_ref_357"><a href="#sec-unwrapdatetimeformat">UnwrapDateTimeFormat</a></emu-xref>(<var>dtf</var>).</li><li>If <var>dtf</var>.[[BoundFormat]] is <emu-val>undefined</emu-val>, then<ol><li>Let <var>F</var> be a new built-in function object as defined in DateTime Format Functions (<emu-xref href="#sec-datetime-format-functions" id="_ref_61"><a href="#sec-datetime-format-functions">12.1.5</a></emu-xref>).</li><li>Set <var>F</var>.[[DateTimeFormat]] to <var>dtf</var>.</li><li>Set <var>dtf</var>.[[BoundFormat]] to <var>F</var>.</li></ol></li><li>Return <var>dtf</var>.[[BoundFormat]].
      </li></ol></emu-alg>

      <emu-note><span class="note">Note</span><div class="note-contents">
        The returned function is bound to <var>dtf</var> so that it can be passed directly to <code>Array.prototype.map</code> or other functions.
        This is considered a historical artefact, as part of a convention which is no longer followed for new features, but is preserved to maintain compatibility with existing programs.

      </div></emu-note>
    </emu-clause>

    <emu-clause id="sec-Intl.DateTimeFormat.prototype.formatToParts">
      <h1><span class="secnum">12.4.4</span>Intl.DateTimeFormat.prototype.formatToParts ( <var>date</var> )</h1>

      <p>
        When the <code>formatToParts</code> method is called with an argument <var>date</var>, the following steps are taken:

      </p>

      <emu-alg><ol><li>Let <var>dtf</var> be <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_358"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>dtf</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>dtf</var> does not have an [[InitializedDateTimeFormat]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>date</var> is <emu-val>undefined</emu-val>, then<ol><li>Let <var>x</var> be <emu-xref aoid="Call" id="_ref_359"><a href="https://tc39.github.io/ecma262/#sec-call">Call</a></emu-xref>(<emu-xref href="#sec-402-well-known-intrinsic-objects" id="_ref_360"><a href="#sec-402-well-known-intrinsic-objects">%Date_now%</a></emu-xref>, <emu-val>undefined</emu-val>).</li></ol></li><li>Else,<ol><li>Let <var>x</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_361"><a href="https://tc39.github.io/ecma262/#sec-tonumber">ToNumber</a></emu-xref>(<var>date</var>).</li></ol></li><li>Return ?&nbsp;<emu-xref aoid="FormatDateTimeToParts" id="_ref_362"><a href="#sec-formatdatetimetoparts">FormatDateTimeToParts</a></emu-xref>(<var>dtf</var>, <var>x</var>).
      </li></ol></emu-alg>
    </emu-clause>

    <emu-clause id="sec-intl.datetimeformat.prototype.resolvedoptions">
      <h1><span class="secnum">12.4.5</span>Intl.DateTimeFormat.prototype.resolvedOptions ()</h1>

      <p>
        This function provides access to the locale and formatting options computed during initialization of the object.

      </p>

      <emu-alg><ol><li>Let <var>dtf</var> be <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_363"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>dtf</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>dtf</var> be ?&nbsp;<emu-xref aoid="UnwrapDateTimeFormat" id="_ref_364"><a href="#sec-unwrapdatetimeformat">UnwrapDateTimeFormat</a></emu-xref>(<var>dtf</var>).</li><li>Let <var>options</var> be !&nbsp;<emu-xref aoid="ObjectCreate" id="_ref_365"><a href="https://tc39.github.io/ecma262/#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-xref href="#sec-properties-of-the-object-prototype-object"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>).</li><li>For each row of <emu-xref href="#table-datetimeformat-resolvedoptions-properties" id="_ref_62"><a href="#table-datetimeformat-resolvedoptions-properties">Table 6</a></emu-xref>, except the header row, in table order, do<ol><li>Let <var>p</var> be the Property value of the current row.</li><li>If <var>p</var> is <code>"hour12"</code>, then<ol><li>Let <var>hc</var> be <var>dtf</var>.[[HourCycle]].</li><li>If <var>hc</var> is <code>"h11"</code> or <code>"h12"</code>, let <var>v</var> be <emu-val>true</emu-val>.</li><li>Else if, <var>hc</var> is <code>"h23"</code> or <code>"h24"</code>, let <var>v</var> be <emu-val>false</emu-val>.</li><li>Else, let <var>v</var> be <emu-val>undefined</emu-val>.</li></ol></li><li>Else,<ol><li>Let <var>v</var> be the value of <var>dtf</var>'s internal slot whose name is the Internal Slot value of the current row.</li></ol></li><li>If <var>v</var> is not <emu-val>undefined</emu-val>, then<ol><li>Perform !&nbsp;<emu-xref aoid="CreateDataPropertyOrThrow" id="_ref_366"><a href="https://tc39.github.io/ecma262/#sec-createdatapropertyorthrow">CreateDataPropertyOrThrow</a></emu-xref>(<var>options</var>, <var>p</var>, <var>v</var>).</li></ol></li></ol></li><li>Return <var>options</var>.
      </li></ol></emu-alg>

      <emu-table id="table-datetimeformat-resolvedoptions-properties"><figure><figcaption>Table 6: Resolved Options of DateTimeFormat Instances</figcaption>

        <table class="real-table">
          <thead>
            <tr>
              <th>Internal Slot</th>
              <th>Property</th>
            </tr>
          </thead>
          <tbody><tr>
            <td>[[Locale]]</td>
            <td><code>"locale"</code></td>
          </tr>
          <tr>
            <td>[[Calendar]]</td>
            <td><code>"calendar"</code></td>
          </tr>
          <tr>
            <td>[[NumberingSystem]]</td>
            <td><code>"numberingSystem"</code></td>
          </tr>
          <tr>
            <td>[[TimeZone]]</td>
            <td><code>"timeZone"</code></td>
          </tr>
          <tr>
            <td>[[HourCycle]]</td>
            <td><code>"hourCycle"</code></td>
          </tr>
          <tr>
            <td></td>
            <td><code>"hour12"</code></td>
          </tr>
          <tr>
            <td>[[Weekday]]</td>
            <td><code>"weekday"</code></td>
          </tr>
          <tr>
            <td>[[Era]]</td>
            <td><code>"era"</code></td>
          </tr>
          <tr>
            <td>[[Year]]</td>
            <td><code>"year"</code></td>
          </tr>
          <tr>
            <td>[[Month]]</td>
            <td><code>"month"</code></td>
          </tr>
          <tr>
            <td>[[Day]]</td>
            <td><code>"day"</code></td>
          </tr>
          <tr>
            <td>[[Hour]]</td>
            <td><code>"hour"</code></td>
          </tr>
          <tr>
            <td>[[Minute]]</td>
            <td><code>"minute"</code></td>
          </tr>
          <tr>
            <td>[[Second]]</td>
            <td><code>"second"</code></td>
          </tr>
          <tr>
            <td>[[TimeZoneName]]</td>
            <td><code>"timeZoneName"</code></td>
          </tr>
        </tbody></table>
      </figure></emu-table>

      <p>
        For web compatibility reasons, if the property hourCycle is set, the hour12 property should be set to <emu-val>true</emu-val> when hourCycle is <code>"h11"</code> or <code>"h12"</code>, or to <emu-val>false</emu-val> when hourCycle is <code>"h23"</code> or <code>"h24"</code>.

      </p>

      <emu-note><span class="note">Note 1</span><div class="note-contents">
        In this version of the ECMAScript 2019 Internationalization API, the timeZone property will be the name of the default time zone if no timeZone property was provided in the options object provided to the Intl.DateTimeFormat constructor. The first edition left the timeZone property <emu-val>undefined</emu-val> in this case.

      </div></emu-note>

      <emu-note><span class="note">Note 2</span><div class="note-contents">
        For compatibility with versions prior to the fifth edition, the <code>"hour12"</code> property is set in addition to the <code>"hourCycle"</code> property.

      </div></emu-note>
    </emu-clause>
  </emu-clause>

  <emu-clause id="sec-properties-of-intl-datetimeformat-instances">
    <h1><span class="secnum">12.5</span>Properties of Intl.DateTimeFormat Instances</h1>

    <p>
      Intl.DateTimeFormat instances inherit properties from <emu-xref href="#sec-properties-of-intl-datetimeformat-prototype-object" id="_ref_367"><a href="#sec-properties-of-intl-datetimeformat-prototype-object">%DateTimeFormatPrototype%</a></emu-xref>.

    </p>

    <p>
      Intl.DateTimeFormat instances have an [[InitializedDateTimeFormat]] internal slot.

    </p>

    <p>
      Intl.DateTimeFormat instances also have several internal slots that are computed by the constructor:

    </p>

    <ul>
      <li>[[Locale]] is a String value with the language tag of the locale whose localization is used for formatting.</li>
      <li>[[Calendar]] is a String value with the <code>"type"</code> given in Unicode Technical Standard 35 for the calendar used for formatting.</li>
      <li>[[NumberingSystem]] is a String value with the <code>"type"</code> given in Unicode Technical Standard 35 for the numbering system used for formatting.</li>
      <li>[[TimeZone]] is a String value with the IANA time zone name of the time zone used for formatting.</li>
      <li>[[Weekday]], [[Era]], [[Year]], [[Month]], [[Day]], [[Hour]], [[Minute]], [[Second]], [[TimeZoneName]] are each either <emu-val>undefined</emu-val>, indicating that the component is not used for formatting, or one of the String values given in  <emu-xref href="#table-datetimeformat-components" id="_ref_63"><a href="#table-datetimeformat-components">Table 5</a></emu-xref>, indicating how the component should be presented in the formatted output.</li>
      <li>[[HourCycle]] is a String value indicating whether the 12-hour format (<code>"h11"</code>, <code>"h12"</code>) or the 24-hour format (<code>"h23"</code>, <code>"h24"</code>) should be used. <code>"h11"</code> and <code>"h23"</code> start with hour 0 and go up to 11 and 23 respectively. <code>"h12"</code> and <code>"h24"</code> start with hour 1 and go up to 12 and 24. [[HourCycle]] is only used when [[Hour]] is not <emu-val>undefined</emu-val>.</li>
      <li>[[Pattern]] is a String value as described in  <emu-xref href="#sec-intl.datetimeformat-internal-slots" id="_ref_64"><a href="#sec-intl.datetimeformat-internal-slots">12.3.3</a></emu-xref>.</li>
    </ul>

    <p>
      Finally, Intl.DateTimeFormat instances have a [[BoundFormat]] internal slot that caches the function returned by the format accessor (<emu-xref href="#sec-intl.datetimeformat.prototype.format" id="_ref_65"><a href="#sec-intl.datetimeformat.prototype.format">12.4.3</a></emu-xref>).

    </p>
  </emu-clause>
</emu-clause>
</emu-import>
<emu-import href="./pluralrules.html"><emu-clause id="pluralrules-objects">
  <h1><span class="secnum">13</span>PluralRules Objects</h1>

  <emu-clause id="sec-intl-pluralrules-abstracts">
    <h1><span class="secnum">13.1</span>Abstract Operations for PluralRules Objects</h1>

    <emu-clause id="sec-initializepluralrules" aoid="InitializePluralRules">
      <h1><span class="secnum">13.1.1</span>InitializePluralRules ( <var>pluralRules</var>, <var>locales</var>, <var>options</var> )</h1>

      <p>
        The abstract operation InitializePluralRules accepts the arguments <var>pluralRules</var> (which must be an object), <var>locales</var>, and <var>options</var>. It initializes <var>pluralRules</var> as a PluralRules object. The following steps are taken:

      </p>

      <emu-alg><ol><li>Let <var>requestedLocales</var> be ?&nbsp;<emu-xref aoid="CanonicalizeLocaleList" id="_ref_368"><a href="#sec-canonicalizelocalelist">CanonicalizeLocaleList</a></emu-xref>(<var>locales</var>).</li><li>If <var>options</var> is <emu-val>undefined</emu-val>, then<ol><li>Let <var>options</var> be <emu-xref aoid="ObjectCreate" id="_ref_369"><a href="https://tc39.github.io/ecma262/#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-val>null</emu-val>).</li></ol></li><li>Else<ol><li>Let <var>options</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_370"><a href="https://tc39.github.io/ecma262/#sec-toobject">ToObject</a></emu-xref>(<var>options</var>).</li></ol></li><li>Let <var>opt</var> be a new <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref>.</li><li>Let <var>matcher</var> be ?&nbsp;<emu-xref aoid="GetOption" id="_ref_371"><a href="#sec-getoption">GetOption</a></emu-xref>(<var>options</var>, <code>"localeMatcher"</code>, <code>"string"</code>, « <code>"lookup"</code>, <code>"best fit"</code> », <code>"best fit"</code>).</li><li>Set <var>opt</var>.[[localeMatcher]] to <var>matcher</var>.</li><li>Let <var>t</var> be ?&nbsp;<emu-xref aoid="GetOption" id="_ref_372"><a href="#sec-getoption">GetOption</a></emu-xref>(<var>options</var>, <code>"type"</code>, <code>"string"</code>, « <code>"cardinal"</code>, <code>"ordinal"</code> », <code>"cardinal"</code>).</li><li>Set <var>pluralRules</var>.[[Type]] to <var>t</var>.</li><li>Perform ?&nbsp;<emu-xref aoid="SetNumberFormatDigitOptions" id="_ref_373"><a href="#sec-setnfdigitoptions">SetNumberFormatDigitOptions</a></emu-xref>(<var>pluralRules</var>, <var>options</var>, <emu-val>0</emu-val>, <emu-val>3</emu-val>).</li><li>Let <var>localeData</var> be <emu-xref href="#sec-intl-pluralrules-constructor" id="_ref_374"><a href="#sec-intl-pluralrules-constructor">%PluralRules%</a></emu-xref>.[[LocaleData]].</li><li>Let <var>r</var> be <emu-xref aoid="ResolveLocale" id="_ref_375"><a href="#sec-resolvelocale">ResolveLocale</a></emu-xref>(<emu-xref href="#sec-intl-pluralrules-constructor" id="_ref_376"><a href="#sec-intl-pluralrules-constructor">%PluralRules%</a></emu-xref>.[[AvailableLocales]], <var>requestedLocales</var>, <var>opt</var>, <emu-xref href="#sec-intl-pluralrules-constructor" id="_ref_377"><a href="#sec-intl-pluralrules-constructor">%PluralRules%</a></emu-xref>.[[RelevantExtensionKeys]], <var>localeData</var>).</li><li>Set <var>pluralRules</var>.[[Locale]] to the value of <var>r</var>.[[locale]].</li><li>Return <var>pluralRules</var>.
      </li></ol></emu-alg>

    </emu-clause>

    <emu-clause id="sec-getoperands" aoid="GetOperands">
       <h1><span class="secnum">13.1.2</span>GetOperands ( <var>s</var> )</h1>
       <p>
         When the GetOperands abstract operation is called with argument <var>s</var>, it performs the following steps:

       </p>

       <emu-alg><ol><li>Assert: <emu-xref aoid="Type" id="_ref_378"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>s</var>) is String.</li><li>Let <var>n</var> be !&nbsp;<emu-xref aoid="ToNumber" id="_ref_379"><a href="https://tc39.github.io/ecma262/#sec-tonumber">ToNumber</a></emu-xref>(<var>s</var>).</li><li>Assert: <var>n</var> is finite.</li><li>Let <var>dp</var> be !&nbsp;<emu-xref aoid="Call" id="_ref_380"><a href="https://tc39.github.io/ecma262/#sec-call">Call</a></emu-xref>(<emu-xref href="#sec-402-well-known-intrinsic-objects" id="_ref_381"><a href="#sec-402-well-known-intrinsic-objects">%StringProto_indexOf%</a></emu-xref>, <var>s</var>, « <code>"."</code> »).</li><li>If <var>dp</var> = -1, then<ol><li>Set <var>iv</var> to <var>n</var>.</li><li>Let <var>f</var> be 0.</li><li>Let <var>v</var> be 0.</li></ol></li><li>Else,<ol><li>Let <var>iv</var> be the substring of <var>s</var> from position 0, inclusive, to position <var>dp</var>, exclusive.</li><li>Let <var>fv</var> be the substring of <var>s</var> from position <var>dp</var>, exclusive, to the end of <var>s</var>.</li><li>Let <var>f</var> be !&nbsp;<emu-xref aoid="ToNumber" id="_ref_382"><a href="https://tc39.github.io/ecma262/#sec-tonumber">ToNumber</a></emu-xref>(<var>fv</var>).</li><li>Let <var>v</var> be the length of <var>fv</var>.</li></ol></li><li>Let <var>i</var> be <emu-xref aoid="abs"><a href="https://tc39.github.io/ecma262/#sec-algorithm-conventions">abs</a></emu-xref>(! <emu-xref aoid="ToNumber" id="_ref_383"><a href="https://tc39.github.io/ecma262/#sec-tonumber">ToNumber</a></emu-xref>(<var>iv</var>)).</li><li>If <var>f</var> ≠ 0, then<ol><li>Let <var>ft</var> be the value of <var>fv</var> stripped of trailing <code>"0"</code>.</li><li>Let <var>w</var> be the length of <var>ft</var>.</li><li>Let <var>t</var> be !&nbsp;<emu-xref aoid="ToNumber" id="_ref_384"><a href="https://tc39.github.io/ecma262/#sec-tonumber">ToNumber</a></emu-xref>(<var>ft</var>).</li></ol></li><li>Else,<ol><li>Let <var>w</var> be 0.</li><li>Let <var>t</var> be 0.</li></ol></li><li>Return a new <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref> { [[Number]]: <var>n</var>, [[IntegerDigits]]: <var>i</var>, [[NumberOfFractionDigits]]: <var>v</var>, [[NumberOfFractionDigitsWithoutTrailing]]: <var>w</var>, [[FractionDigits]]: <var>f</var>, [[FractionDigitsWithoutTrailing]]: <var>t</var> }.
       </li></ol></emu-alg>

       <emu-table id="table-plural-operands"><figure><figcaption>Table 7: Plural Rules Operands <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref> Fields</figcaption>

         <table class="real-table">
           <thead>
             <tr>
               <th>Internal Slot</th>
               <th>Type</th>
               <th>Description</th>
             </tr>
           </thead>
           <tbody><tr>
             <td>[[Number]]</td>
             <td>Number</td>
             <td>Absolute value of the source number (integer and decimals)</td>
           </tr>
           <tr>
             <td>[[IntegerDigits]]</td>
             <td>Number</td>
             <td>Number of digits of [[Number]].</td>
           </tr>
           <tr>
             <td>[[NumberOfFractionDigits]]</td>
             <td>Number</td>
             <td>Number of visible fraction digits in [[Number]],  <i>with</i> trailing zeros.</td>
           </tr>
           <tr>
             <td>[[NumberOfFractionDigitsWithoutTrailing]]</td>
             <td>Number</td>
             <td>Number of visible fraction digits in [[Number]],  <i>without</i> trailing zeros.</td>
           </tr>
           <tr>
             <td>[[FractionDigits]]</td>
             <td>Number</td>
             <td>Number of visible fractional digits in [[Number]],  <i>with</i> trailing zeros.</td>
           </tr>
           <tr>
             <td>[[FractionDigitsWithoutTrailing]]</td>
             <td>Number</td>
             <td>Number of visible fractional digits in [[Number]],  <i>without</i> trailing zeros.  </td>
           </tr>
         </tbody></table>
       </figure></emu-table>

    </emu-clause>

    <emu-clause id="sec-pluralruleselect" aoid="PluralRuleSelect">

      <h1><span class="secnum">13.1.3</span>PluralRuleSelect ( <var>locale</var>, <var>type</var>, <var>n</var>, <var>operands</var> )</h1>

      <p>
        When the PluralRuleSelect abstract operation is called with four arguments, it performs an implementation-dependent algorithm to map <var>n</var> to the appropriate plural representation of the Plural Rules Operands <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref> <var>operands</var> by selecting the rules denoted by <var>type</var> for the corresponding <var>locale</var>, or the String value <code>"other"</code>.

      </p>

    </emu-clause>

    <emu-clause id="sec-resolveplural" aoid="ResolvePlural">
      <h1><span class="secnum">13.1.4</span>ResolvePlural ( <var>pluralRules</var>, <var>n</var> )</h1>
      <p>
        When the ResolvePlural abstract operation is called with arguments <var>pluralRules</var> (which must be an object initialized as a PluralRules) and <var>n</var> (which must be a Number value), it returns a String value representing the plural form of <var>n</var> according to the effective locale and the options of <var>pluralRules</var>. The following steps are taken:

      </p>

      <emu-alg><ol><li>Assert: <emu-xref aoid="Type" id="_ref_385"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>pluralRules</var>) is Object.</li><li>Assert: <var>pluralRules</var> has an [[InitializedPluralRules]] internal slot.</li><li>Assert: <emu-xref aoid="Type" id="_ref_386"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>n</var>) is Number.</li><li>If <var>n</var> is not a finite Number, then<ol><li>Return <code>"other"</code>.</li></ol></li><li>Let <var>locale</var> be <var>pluralRules</var>.[[Locale]].</li><li>Let <var>type</var> be <var>pluralRules</var>.[[Type]].</li><li>Let <var>s</var> be !&nbsp;<emu-xref aoid="FormatNumberToString" id="_ref_387"><a href="#sec-formatnumberstring">FormatNumberToString</a></emu-xref>(<var>pluralRules</var>, <var>n</var>).</li><li>Let <var>operands</var> be ?&nbsp;<var>GetOperands</var>(<var>s</var>).</li><li>Return ?&nbsp;<emu-xref aoid="PluralRuleSelect" id="_ref_388"><a href="#sec-pluralruleselect">PluralRuleSelect</a></emu-xref>(<var>locale</var>, <var>type</var>, <var>n</var>, <var>operands</var>).
      </li></ol></emu-alg>

    </emu-clause>

  </emu-clause>

  <emu-clause id="sec-intl-pluralrules-constructor">
    <h1><span class="secnum">13.2</span>The Intl.PluralRules Constructor</h1>

    <p>
      The PluralRules constructor is the  <dfn>%PluralRules%</dfn> intrinsic object and a standard built-in property of the Intl object. Behaviour common to all service constructor properties of the Intl object is specified in  <emu-xref href="#sec-internal-slots" id="_ref_66"><a href="#sec-internal-slots">9.1</a></emu-xref>.

    </p>

    <emu-clause id="sec-intl.pluralrules">
      <h1><span class="secnum">13.2.1</span>Intl.PluralRules ( [ <var>locales</var> [ , <var>options</var> ] ] )</h1>

      <p>
        When the <code>Intl.PluralRules</code> function is called with optional arguments <var>locales</var> and <var>options</var>, the following steps are taken:

      </p>

      <emu-alg><ol><li>If NewTarget is <emu-val>undefined</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>pluralRules</var> be ?&nbsp;<emu-xref aoid="OrdinaryCreateFromConstructor" id="_ref_389"><a href="https://tc39.github.io/ecma262/#sec-ordinarycreatefromconstructor">OrdinaryCreateFromConstructor</a></emu-xref>(<var>newTarget</var>, "<emu-xref href="#sec-properties-of-intl-pluralrules-prototype-object" id="_ref_390"><a href="#sec-properties-of-intl-pluralrules-prototype-object">%PluralRulesPrototype%</a></emu-xref>", « [[InitializedPluralRules]], [[Locale]], [[Type]], [[MinimumIntegerDigits]], [[MinimumFractionDigits]], [[MaximumFractionDigits]], [[MinimumSignificantDigits]], [[MaximumSignificantDigits]] »).</li><li>Return ?&nbsp;<emu-xref aoid="InitializePluralRules" id="_ref_391"><a href="#sec-initializepluralrules">InitializePluralRules</a></emu-xref>(<var>pluralRules</var>, <var>locales</var>, <var>options</var>).
      </li></ol></emu-alg>
    </emu-clause>
  </emu-clause>

  <emu-clause id="sec-properties-of-intl-pluralrules-constructor">
    <h1><span class="secnum">13.3</span>Properties of the Intl.PluralRules Constructor</h1>

    <p>
      The Intl.PluralRules constructor has the following properties:

    </p>

    <emu-clause id="sec-intl.pluralrules.prototype">
      <h1><span class="secnum">13.3.1</span>Intl.PluralRules.prototype</h1>

      <p>
        The value of <code>Intl.PluralRules.prototype</code> is <emu-xref href="#sec-properties-of-intl-pluralrules-prototype-object" id="_ref_392"><a href="#sec-properties-of-intl-pluralrules-prototype-object">%PluralRulesPrototype%</a></emu-xref>.

      </p>
      <p>
        This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>false</emu-val> }.

      </p>
    </emu-clause>

    <emu-clause id="sec-intl.pluralrules.supportedlocalesof">
      <h1><span class="secnum">13.3.2</span>Intl.PluralRules.supportedLocalesOf ( <var>locales</var> [, <var>options</var> ] )</h1>

      <p>
        When the <code>supportedLocalesOf</code> method is called with arguments <var>locales</var> and <var>options</var>, the following steps are taken:

      </p>

      <emu-alg><ol><li>Let <var>availableLocales</var> be <emu-xref href="#sec-intl-pluralrules-constructor" id="_ref_393"><a href="#sec-intl-pluralrules-constructor">%PluralRules%</a></emu-xref>.[[AvailableLocales]].</li><li>Let <var>requestedLocales</var> be ?&nbsp;<emu-xref aoid="CanonicalizeLocaleList" id="_ref_394"><a href="#sec-canonicalizelocalelist">CanonicalizeLocaleList</a></emu-xref>(<var>locales</var>).</li><li>Return ?&nbsp;<emu-xref aoid="SupportedLocales" id="_ref_395"><a href="#sec-supportedlocales">SupportedLocales</a></emu-xref>(<var>availableLocales</var>, <var>requestedLocales</var>, <var>options</var>).
      </li></ol></emu-alg>

      <p>
        The value of the <code>length</code> property of the <emu-val>supportedLocalesOf</emu-val> method is 1.

      </p>
    </emu-clause>

    <emu-clause id="sec-intl.pluralrules-internal-slots">
      <h1><span class="secnum">13.3.3</span>Internal slots</h1>

      <p>
        The value of the [[AvailableLocales]] internal slot is implementation defined within the constraints described in  <emu-xref href="#sec-internal-slots" id="_ref_67"><a href="#sec-internal-slots">9.1</a></emu-xref>.

      </p>

      <p>
        The value of the [[RelevantExtensionKeys]] internal slot is <emu-val>[]</emu-val>.

      </p>

      <emu-note><span class="note">Note 1</span><div class="note-contents">
        Unicode Technical Standard 35 describes no locale extension keys that are relevant to the pluralization process.

      </div></emu-note>

      <p>
        The value of the [[LocaleData]] internal slot is implementation defined within the constraints described in  <emu-xref href="#sec-internal-slots" id="_ref_68"><a href="#sec-internal-slots">9.1</a></emu-xref>.

      </p>

      <emu-note><span class="note">Note 2</span><div class="note-contents">
        It is recommended that implementations use the locale data provided by the Common Locale Data Repository (available at  <a href="http://cldr.unicode.org/">http://cldr.unicode.org/</a>).

      </div></emu-note>

    </emu-clause>
  </emu-clause>

  <emu-clause id="sec-properties-of-intl-pluralrules-prototype-object">
    <h1><span class="secnum">13.4</span>Properties of the Intl.PluralRules Prototype Object</h1>

    <p>
      The Intl.PluralRules prototype object is itself an ordinary object.  <dfn>%PluralRulesPrototype%</dfn> is not an Intl.PluralRules instance and does not have an [[InitializedPluralRules]] internal slot or any of the other internal slots of Intl.PluralRules instance objects.

    </p>

    <emu-clause id="sec-intl.pluralrules.prototype.constructor">
      <h1><span class="secnum">13.4.1</span>Intl.PluralRules.prototype.constructor</h1>

      <p>
        The initial value of <code>Intl.PluralRules.prototype.constructor</code> is the intrinsic object <emu-xref href="#sec-intl-pluralrules-constructor" id="_ref_396"><a href="#sec-intl-pluralrules-constructor">%PluralRules%</a></emu-xref>.

      </p>
    </emu-clause>

    <emu-clause id="sec-intl.pluralrules.prototype-tostringtag">
      <h1><span class="secnum">13.4.2</span>Intl.PluralRules.prototype [ @@toStringTag ]</h1>

      <p>
        The initial value of the @@toStringTag property is the string value <code>"Object"</code>.

      </p>
      <p>
        This property has the attributes { [[Writable]]: <emu-val>false</emu-val>, [[Enumerable]]: <emu-val>false</emu-val>, [[Configurable]]: <emu-val>true</emu-val> }.

      </p>
    </emu-clause>

    <emu-clause id="sec-intl.pluralrules.prototype.select">
      <h1><span class="secnum">13.4.3</span>Intl.PluralRules.prototype.select( <var>value</var> )</h1>

      <p>
        When the <code>select</code> method is called with an argument <var>value</var>, the following steps are taken:

      </p>

      <emu-alg><ol><li>Let <var>pr</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_397"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>pr</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>pr</var> does not have an [[InitializedPluralRules]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>n</var> be ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_398"><a href="https://tc39.github.io/ecma262/#sec-tonumber">ToNumber</a></emu-xref>(<var>value</var>).</li><li>Return ?&nbsp;<emu-xref aoid="ResolvePlural" id="_ref_399"><a href="#sec-resolveplural">ResolvePlural</a></emu-xref>(<var>pr</var>, <var>n</var>).
      </li></ol></emu-alg>
    </emu-clause>

    <emu-clause id="sec-intl.pluralrules.prototype.resolvedoptions">
      <h1><span class="secnum">13.4.4</span>Intl.PluralRules.prototype.resolvedOptions ()</h1>

      <p>
        This function provides access to the locale and options computed during initialization of the object.

      </p>

      <emu-alg><ol><li>Let <var>pr</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_400"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>pr</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>pr</var> does not have an [[InitializedPluralRules]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>options</var> be !&nbsp;<emu-xref aoid="ObjectCreate" id="_ref_401"><a href="https://tc39.github.io/ecma262/#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-xref href="#sec-properties-of-the-object-prototype-object"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>).</li><li>For each row of <emu-xref href="#table-pluralrules-resolvedoptions-properties" id="_ref_69"><a href="#table-pluralrules-resolvedoptions-properties">Table 8</a></emu-xref>, except the header row, in table order, do<ol><li>Let <var>p</var> be the Property value of the current row.</li><li>Let <var>v</var> be the value of <var>pr</var>'s internal slot whose name is the Internal Slot value of the current row.</li><li>If <var>v</var> is not <emu-val>undefined</emu-val>, then<ol><li>Perform !&nbsp;<emu-xref aoid="CreateDataPropertyOrThrow" id="_ref_402"><a href="https://tc39.github.io/ecma262/#sec-createdatapropertyorthrow">CreateDataPropertyOrThrow</a></emu-xref>(<var>options</var>, <var>p</var>, <var>v</var>).</li></ol></li></ol></li><li>Let <var>pluralCategories</var> be a <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">List</a></emu-xref> of Strings representing the possible results of <emu-xref href="#sec-pluralruleselect" id="_ref_70"><a href="#sec-pluralruleselect">PluralRuleSelect</a></emu-xref> for the selected locale <var>pr</var>.[[Locale]]. This <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">List</a></emu-xref> consists of unique string values, from the the list <code>"zero"</code>, <code>"one"</code>, <code>"two"</code>, <code>"few"</code>, <code>"many"</code> and <code>"other"</code>, that are relevant for the locale whose localization is specified in LDML Language Plural Rules.</li><li>Perform !&nbsp;<emu-xref aoid="CreateDataProperty" id="_ref_403"><a href="https://tc39.github.io/ecma262/#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>options</var>, <code>"pluralCategories"</code>, <emu-xref aoid="CreateArrayFromList" id="_ref_404"><a href="https://tc39.github.io/ecma262/#sec-createarrayfromlist">CreateArrayFromList</a></emu-xref>(<var>pluralCategories</var>)).</li><li>Return <var>options</var>.
      </li></ol></emu-alg>

      <emu-table id="table-pluralrules-resolvedoptions-properties"><figure><figcaption>Table 8: Resolved Options of PluralRules Instances</figcaption>

        <table class="real-table">
          <thead>
            <tr>
              <th>Internal Slot</th>
              <th>Property</th>
            </tr>
          </thead>
          <tbody><tr>
            <td>[[Locale]]</td>
            <td><code>"locale"</code></td>
          </tr>
          <tr>
            <td>[[Type]]</td>
            <td><code>"type"</code></td>
          </tr>
          <tr>
            <td>[[MinimumIntegerDigits]]</td>
            <td><code>"minimumIntegerDigits"</code></td>
          </tr>
          <tr>
            <td>[[MinimumFractionDigits]]</td>
            <td><code>"minimumFractionDigits"</code></td>
          </tr>
          <tr>
            <td>[[MaximumFractionDigits]]</td>
            <td><code>"maximumFractionDigits"</code></td>
          </tr>
          <tr>
            <td>[[MinimumSignificantDigits]]</td>
            <td><code>"minimumSignificantDigits"</code></td>
          </tr>
          <tr>
            <td>[[MaximumSignificantDigits]]</td>
            <td><code>"maximumSignificantDigits"</code></td>
          </tr>
        </tbody></table>
      </figure></emu-table>
    </emu-clause>
  </emu-clause>

  <emu-clause id="sec-properties-of-intl-pluralrules-instances">
    <h1><span class="secnum">13.5</span>Properties of Intl.PluralRules Instances</h1>

    <p>
      Intl.PluralRules instances inherit properties from <emu-xref href="#sec-properties-of-intl-pluralrules-prototype-object" id="_ref_405"><a href="#sec-properties-of-intl-pluralrules-prototype-object">%PluralRulesPrototype%</a></emu-xref>.

    </p>

    <p>
      Intl.PluralRules instances have an [[InitializedPluralRules]] internal slots.

    </p>

    <p>
      Intl.PluralRules instances also have several internal slots that are computed by the constructor:

    </p>

    <ul>
      <li>[[Locale]] is a String value with the language tag of the locale whose localization is used by the plural rules.</li>
      <li>[[Type]] is one of the String values <code>"cardinal"</code> or <code>"ordinal"</code>, identifying the plural rules used.</li>
      <li>[[MinimumIntegerDigits]] is a non-negative integer Number value indicating the minimum integer digits to be used.</li>
      <li>[[MinimumFractionDigits]] and [[MaximumFractionDigits]] are non-negative integer Number values indicating the minimum and maximum fraction digits to be used. Numbers will be rounded or padded with trailing zeroes if necessary.</li>
      <li>[[MinimumSignificantDigits]] and [[MaximumSignificantDigits]] are positive integer Number values indicating the minimum and maximum fraction digits to be used. Either none or both of these properties are present; if they are, they override minimum and maximum integer and fraction digits.</li>
    </ul>

  </emu-clause>
</emu-clause>
</emu-import>
<emu-import href="./locale-sensitive-functions.html"><emu-clause id="locale-sensitive-functions">
  <h1><span class="secnum">14</span>Locale Sensitive Functions of the ECMAScript Language Specification</h1>

  <p>
    The ECMAScript Language Specification, edition 10 or successor, describes several locale sensitive functions. An ECMAScript implementation that implements this Internationalization API Specification shall implement these functions as described here.

  </p>

  <emu-note><span class="note">Note</span><div class="note-contents">
    The Collator, NumberFormat, or DateTimeFormat objects created in the algorithms in this clause are only used within these algorithms. They are never directly accessed by ECMAScript code and need not actually exist within an implementation.

  </div></emu-note>

  <emu-clause id="sup-properties-of-the-string-prototype-object">
    <h1><span class="secnum">14.1</span>Properties of the String Prototype Object</h1>

    <emu-clause id="sup-String.prototype.localeCompare">
      <h1><span class="secnum">14.1.1</span>String.prototype.localeCompare ( <var>that</var> [ , <var>locales</var> [ , <var>options</var> ] ] )</h1>

      <p>
        This definition supersedes the definition provided in ES2019,  <emu-xref href="#sec-string.prototype.localecompare"><a href="https://tc39.github.io/ecma262/#sec-string.prototype.localecompare">21.1.3.10</a></emu-xref>.

      </p>

      <p>
        When the <code>localeCompare</code> method is called with argument <var>that</var> and optional arguments <var>locales</var>, and <var>options</var>, the following steps are taken:

      </p>

      <emu-alg><ol><li>Let <var>O</var> be <emu-xref aoid="RequireObjectCoercible" id="_ref_406"><a href="https://tc39.github.io/ecma262/#sec-requireobjectcoercible">RequireObjectCoercible</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>S</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_407"><a href="https://tc39.github.io/ecma262/#sec-tostring">ToString</a></emu-xref>(<var>O</var>).</li><li>Let <var>thatValue</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_408"><a href="https://tc39.github.io/ecma262/#sec-tostring">ToString</a></emu-xref>(<var>that</var>).</li><li>Let <var>collator</var> be ?&nbsp;<emu-xref aoid="Construct" id="_ref_409"><a href="https://tc39.github.io/ecma262/#sec-construct">Construct</a></emu-xref>(<emu-xref href="#sec-the-intl-collator-constructor" id="_ref_410"><a href="#sec-the-intl-collator-constructor">%Collator%</a></emu-xref>, « <var>locales</var>, <var>options</var> »).</li><li>Return <emu-xref aoid="CompareStrings" id="_ref_411"><a href="#sec-collator-comparestrings">CompareStrings</a></emu-xref>(<var>collator</var>, <var>S</var>, <var>thatValue</var>).
      </li></ol></emu-alg>

      <p>
        The value of the <code>length</code> property of the <emu-val>localeCompare</emu-val> method is 1.

      </p>

      <emu-note><span class="note">Note 1</span><div class="note-contents">
        The <code>localeCompare</code> method itself is not directly suitable as an argument to <emu-val>Array.prototype.sort</emu-val> because the latter requires a function of two arguments.

      </div></emu-note>

      <emu-note><span class="note">Note 2</span><div class="note-contents">
        The <code>localeCompare</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be a String object. Therefore, it can be transferred to other kinds of objects for use as a method.

      </div></emu-note>

    </emu-clause>

    <emu-clause id="sup-string.prototype.tolocalelowercase">
      <h1><span class="secnum">14.1.2</span>String.prototype.toLocaleLowerCase ( [ <var>locales</var> ] )</h1>

      <p>
        This definition supersedes the definition provided in ES2019,  <emu-xref href="#sec-string.prototype.tolocalelowercase"><a href="https://tc39.github.io/ecma262/#sec-string.prototype.tolocalelowercase">21.1.3.22</a></emu-xref>.

      </p>

      <p>
        This function interprets a string value as a sequence of code points, as described in ES2019,  <emu-xref href="#sec-ecmascript-language-types-string-type"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-language-types-string-type">6.1.4</a></emu-xref>. The following steps are taken:

      </p>

      <emu-alg><ol><li>Let <var>O</var> be <emu-xref aoid="RequireObjectCoercible" id="_ref_412"><a href="https://tc39.github.io/ecma262/#sec-requireobjectcoercible">RequireObjectCoercible</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>S</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_413"><a href="https://tc39.github.io/ecma262/#sec-tostring">ToString</a></emu-xref>(<var>O</var>).</li><li>Let <var>requestedLocales</var> be ?&nbsp;<emu-xref aoid="CanonicalizeLocaleList" id="_ref_414"><a href="#sec-canonicalizelocalelist">CanonicalizeLocaleList</a></emu-xref>(<var>locales</var>).</li><li>If <var>requestedLocales</var> is not an empty <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">List</a></emu-xref>, then<ol><li>Let <var>requestedLocale</var> be <var>requestedLocales</var>[0].</li></ol></li><li>Else,<ol><li>Let <var>requestedLocale</var> be <emu-xref aoid="DefaultLocale" id="_ref_415"><a href="#sec-defaultlocale">DefaultLocale</a></emu-xref>().</li></ol></li><li>Let <var>noExtensionsLocale</var> be the String value that is <var>requestedLocale</var> with all Unicode locale extension sequences (<emu-xref href="#sec-unicode-locale-extension-sequences" id="_ref_71"><a href="#sec-unicode-locale-extension-sequences">6.2.1</a></emu-xref>) removed.</li><li>Let <var>availableLocales</var> be a <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">List</a></emu-xref> with the language tags of the languages for which the Unicode character database contains language sensitive case mappings.</li><li>Let <var>locale</var> be <emu-xref aoid="BestAvailableLocale" id="_ref_416"><a href="#sec-bestavailablelocale">BestAvailableLocale</a></emu-xref>(<var>availableLocales</var>, <var>noExtensionsLocale</var>).</li><li>If <var>locale</var> is <emu-val>undefined</emu-val>, let <var>locale</var> be <code>"und"</code>.</li><li>Let <var>cpList</var> be a <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">List</a></emu-xref> containing in order the code points of <var>S</var> as defined in ES2019, <emu-xref href="#sec-ecmascript-language-types-string-type"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-language-types-string-type">6.1.4</a></emu-xref>, starting at the first element of <var>S</var>.</li><li>For each code point <var>c</var> in <var>cpList</var>, if the Unicode Character Database provides a lower case equivalent of <var>c</var> that is either language insensitive or for the language <var>locale</var>, replace <var>c</var> in <var>cpList</var> with that/those equivalent code point(s).</li><li>Let <var>cuList</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>For each code point <var>c</var> in <var>cpList</var>, in order, append to <var>cuList</var> the elements of the UTF-16 Encoding (defined in ES2019, <emu-xref href="#sec-ecmascript-language-types-string-type"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-language-types-string-type">6.1.4</a></emu-xref>) of <var>c</var>.</li><li>Let <var>L</var> be a String whose elements are, in order, the elements of <var>cuList</var>.</li><li>Return <var>L</var>.
      </li></ol></emu-alg>

      <p>
        The result must be derived according to the case mappings in the Unicode character database (this explicitly includes not only the UnicodeData.txt file, but also the SpecialCasings.txt file that accompanies it).

      </p>

      <emu-note><span class="note">Note 1</span><div class="note-contents">
        As of Unicode 10.0, the <var>availableLocales</var> list contains the elements <code>"az"</code>, <code>"lt"</code>, and <code>"tr"</code>.

      </div></emu-note>

      <emu-note><span class="note">Note 2</span><div class="note-contents">
        The case mapping of some code points may produce multiple code points. In this case the result String may not be the same length as the source String. Because both <emu-val>toLocaleUpperCase</emu-val> and <emu-val>toLocaleLowerCase</emu-val> have context-sensitive behaviour, the functions are not symmetrical. In other words, <emu-val>s.toLocaleUpperCase().toLocaleLowerCase()</emu-val> is not necessarily equal to <emu-val>s.toLocaleLowerCase()</emu-val>.

      </div></emu-note>

      <emu-note><span class="note">Note 3</span><div class="note-contents">
        The <code>toLocaleLowerCase</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be a String object. Therefore, it can be transferred to other kinds of objects for use as a method.

      </div></emu-note>

    </emu-clause>

    <emu-clause id="sup-string.prototype.tolocaleuppercase">
      <h1><span class="secnum">14.1.3</span>String.prototype.toLocaleUpperCase ( [ <var>locales</var> ] )</h1>

      <p>
        This definition supersedes the definition provided in ES2019,  <emu-xref href="#sec-string.prototype.tolocaleuppercase"><a href="https://tc39.github.io/ecma262/#sec-string.prototype.tolocaleuppercase">21.1.3.23</a></emu-xref>.

      </p>

      <p>
        This function interprets a string value as a sequence of code points, as described in ES2019,  <emu-xref href="#sec-ecmascript-language-types-string-type"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-language-types-string-type">6.1.4</a></emu-xref>. This function behaves in exactly the same way as <code>String.prototype.toLocaleLowerCase</code>, except that characters are mapped to their <var>uppercase</var> equivalents as specified in the Unicode character database.

      </p>

      <emu-note><span class="note">Note</span><div class="note-contents">
        The <code>toLocaleUpperCase</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be a String object. Therefore, it can be transferred to other kinds of objects for use as a method.

      </div></emu-note>

    </emu-clause>
  </emu-clause>


  <emu-clause id="sup-properties-of-the-number-prototype-object">
    <h1><span class="secnum">14.2</span>Properties of the Number Prototype Object</h1>

    <p>
      The following definition(s) refer to the abstract operation thisNumberValue as defined in ES2019,  <emu-xref href="#sec-properties-of-the-number-prototype-object"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-number-prototype-object">20.1.3</a></emu-xref>.

    </p>

    <emu-clause id="sup-number.prototype.tolocalestring">
      <h1><span class="secnum">14.2.1</span>Number.prototype.toLocaleString ( [ <var>locales</var> [ , <var>options</var> ] ] )</h1>

      <p>
        This definition supersedes the definition provided in ES2019,  <emu-xref href="#sec-number.prototype.tolocalestring"><a href="https://tc39.github.io/ecma262/#sec-number.prototype.tolocalestring">20.1.3.4</a></emu-xref>.

      </p>

      <p>
        When the <code>toLocaleString</code> method is called with optional arguments <var>locales</var> and <var>options</var>, the following steps are taken:

      </p>

      <emu-alg><ol><li>Let <var>x</var> be ?&nbsp;thisNumberValue(<emu-val>this</emu-val> value).</li><li>Let <var>numberFormat</var> be ?&nbsp;<emu-xref aoid="Construct" id="_ref_417"><a href="https://tc39.github.io/ecma262/#sec-construct">Construct</a></emu-xref>(<emu-xref href="#sec-intl-numberformat-constructor" id="_ref_418"><a href="#sec-intl-numberformat-constructor">%NumberFormat%</a></emu-xref>, « <var>locales</var>, <var>options</var> »).</li><li>Return <emu-xref aoid="FormatNumber" id="_ref_419"><a href="#sec-formatnumber">FormatNumber</a></emu-xref>(<var>numberFormat</var>, <var>x</var>).
      </li></ol></emu-alg>

    </emu-clause>
  </emu-clause>

  <emu-clause id="sup-properties-of-the-date-prototype-object">
    <h1><span class="secnum">14.3</span>Properties of the Date Prototype Object</h1>

    <p>
      The following definition(s) refer to the abstract operation <emu-xref aoid="thisTimeValue" id="_ref_420"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref> as defined in ES2019,  <emu-xref href="#sec-properties-of-the-date-prototype-object"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">20.3.4</a></emu-xref>.

    </p>

    <emu-clause id="sup-date.prototype.tolocalestring">
      <h1><span class="secnum">14.3.1</span>Date.prototype.toLocaleString ( [ <var>locales</var> [ , <var>options</var> ] ] )</h1>

      <p>
        This definition supersedes the definition provided in ES2019,  <emu-xref href="#sec-date.prototype.tolocalestring"><a href="https://tc39.github.io/ecma262/#sec-date.prototype.tolocalestring">20.3.4.39</a></emu-xref>.

      </p>

      <p>
        When the <code>toLocaleString</code> method is called with optional arguments <var>locales</var> and <var>options</var>, the following steps are taken:

      </p>

      <emu-alg><ol><li>Let <var>x</var> be ?&nbsp;<emu-xref aoid="thisTimeValue" id="_ref_421"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>If <var>x</var> is <emu-val>NaN</emu-val>, return <code>"Invalid Date"</code>.</li><li>Let <var>options</var> be ?&nbsp;<emu-xref aoid="ToDateTimeOptions" id="_ref_422"><a href="#sec-todatetimeoptions">ToDateTimeOptions</a></emu-xref>(<var>options</var>, <code>"any"</code>, <code>"all"</code>).</li><li>Let <var>dateFormat</var> be ?&nbsp;<emu-xref aoid="Construct" id="_ref_423"><a href="https://tc39.github.io/ecma262/#sec-construct">Construct</a></emu-xref>(<emu-xref href="#sec-intl-datetimeformat-constructor" id="_ref_424"><a href="#sec-intl-datetimeformat-constructor">%DateTimeFormat%</a></emu-xref>, « <var>locales</var>, <var>options</var> »).</li><li>Return <emu-xref aoid="FormatDateTime" id="_ref_425"><a href="#sec-formatdatetime">FormatDateTime</a></emu-xref>(<var>dateFormat</var>, <var>x</var>).
      </li></ol></emu-alg>

    </emu-clause>

    <emu-clause id="sup-date.prototype.tolocaledatestring">
      <h1><span class="secnum">14.3.2</span>Date.prototype.toLocaleDateString ( [ <var>locales</var> [ , <var>options</var> ] ] )</h1>

      <p>
        This definition supersedes the definition provided in ES2019,  <emu-xref href="#sec-date.prototype.tolocaledatestring"><a href="https://tc39.github.io/ecma262/#sec-date.prototype.tolocaledatestring">20.3.4.38</a></emu-xref>.

      </p>

      <p>
        When the <code>toLocaleDateString</code> method is called with optional arguments <var>locales</var> and <var>options</var>, the following steps are taken:

      </p>

      <emu-alg><ol><li>Let <var>x</var> be ?&nbsp;<emu-xref aoid="thisTimeValue" id="_ref_426"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>If <var>x</var> is <emu-val>NaN</emu-val>, return <code>"Invalid Date"</code>.</li><li>Let <var>options</var> be ?&nbsp;<emu-xref aoid="ToDateTimeOptions" id="_ref_427"><a href="#sec-todatetimeoptions">ToDateTimeOptions</a></emu-xref>(<var>options</var>, <code>"date"</code>, <code>"date"</code>).</li><li>Let <var>dateFormat</var> be ?&nbsp;<emu-xref aoid="Construct" id="_ref_428"><a href="https://tc39.github.io/ecma262/#sec-construct">Construct</a></emu-xref>(<emu-xref href="#sec-intl-datetimeformat-constructor" id="_ref_429"><a href="#sec-intl-datetimeformat-constructor">%DateTimeFormat%</a></emu-xref>, « <var>locales</var>, <var>options</var> »).</li><li>Return <emu-xref aoid="FormatDateTime" id="_ref_430"><a href="#sec-formatdatetime">FormatDateTime</a></emu-xref>(<var>dateFormat</var>, <var>x</var>).
      </li></ol></emu-alg>

    </emu-clause>

    <emu-clause id="sup-date.prototype.tolocaletimestring">
      <h1><span class="secnum">14.3.3</span>Date.prototype.toLocaleTimeString ( [ <var>locales</var> [ , <var>options</var> ] ] )</h1>

      <p>
        This definition supersedes the definition provided in ES2019,  <emu-xref href="#sec-date.prototype.tolocaletimestring"><a href="https://tc39.github.io/ecma262/#sec-date.prototype.tolocaletimestring">20.3.4.40</a></emu-xref>.

      </p>

      <p>
        When the <code>toLocaleTimeString</code> method is called with optional arguments <var>locales</var> and <var>options</var>, the following steps are taken:

      </p>

      <emu-alg><ol><li>Let <var>x</var> be ?&nbsp;<emu-xref aoid="thisTimeValue" id="_ref_431"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-date-prototype-object">thisTimeValue</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>If <var>x</var> is <emu-val>NaN</emu-val>, return <code>"Invalid Date"</code>.</li><li>Let <var>options</var> be ?&nbsp;<emu-xref aoid="ToDateTimeOptions" id="_ref_432"><a href="#sec-todatetimeoptions">ToDateTimeOptions</a></emu-xref>(<var>options</var>, <code>"time"</code>, <code>"time"</code>).</li><li>Let <var>timeFormat</var> be ?&nbsp;<emu-xref aoid="Construct" id="_ref_433"><a href="https://tc39.github.io/ecma262/#sec-construct">Construct</a></emu-xref>(<emu-xref href="#sec-intl-datetimeformat-constructor" id="_ref_434"><a href="#sec-intl-datetimeformat-constructor">%DateTimeFormat%</a></emu-xref>, « <var>locales</var>, <var>options</var> »).</li><li>Return <emu-xref aoid="FormatDateTime" id="_ref_435"><a href="#sec-formatdatetime">FormatDateTime</a></emu-xref>(<var>timeFormat</var>, <var>x</var>).
      </li></ol></emu-alg>

    </emu-clause>
  </emu-clause>

  <emu-clause id="sup-properties-of-the-array-prototype-object">
    <h1><span class="secnum">14.4</span>Properties of the Array Prototype Object</h1>

    <emu-clause id="sup-array.prototype.tolocalestring">
      <h1><span class="secnum">14.4.1</span>Array.prototype.toLocaleString ( [ <var>locales</var> [ , <var>options</var> ] ] )</h1>

      <p>
        This definition supersedes the definition provided in ES2019,  <emu-xref href="#sec-array.prototype.tolocalestring"><a href="https://tc39.github.io/ecma262/#sec-array.prototype.tolocalestring">22.1.3.27</a></emu-xref>.

      </p>

      <p>
        When the <code>toLocaleString</code> method is called with optional arguments <var>locales</var> and <var>options</var>, the following steps are taken:

      </p>

      <emu-alg><ol><li>Let <var>array</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_436"><a href="https://tc39.github.io/ecma262/#sec-toobject">ToObject</a></emu-xref>(<emu-val>this</emu-val> value).</li><li>Let <var>len</var> be ?&nbsp;<emu-xref aoid="ToLength" id="_ref_437"><a href="https://tc39.github.io/ecma262/#sec-tolength">ToLength</a></emu-xref>(? <emu-xref aoid="Get" id="_ref_438"><a href="https://tc39.github.io/ecma262/#sec-get-o-p">Get</a></emu-xref>(<var>array</var>, <code>"length"</code>)).</li><li>Let <var>separator</var> be the String value for the list-separator String appropriate for the host environment's current locale (this is derived in an implementation-defined way).</li><li>Let <var>R</var> be the empty String.</li><li>Let <var>k</var> be 0.</li><li>Repeat, while <var>k</var> &lt; <var>len</var><ol><li>If <var>k</var> &gt; 0, then<ol><li>Set <var>R</var> to the string-concatenation of <var>R</var> and <var>separator</var>.</li></ol></li><li>Let <var>nextElement</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_439"><a href="https://tc39.github.io/ecma262/#sec-get-o-p">Get</a></emu-xref>(<var>array</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_440"><a href="https://tc39.github.io/ecma262/#sec-tostring">ToString</a></emu-xref>(<var>k</var>)).</li><li>If <var>nextElement</var> is not <emu-val>undefined</emu-val> or <emu-val>null</emu-val>, then<ol><li>Let <var>S</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_441"><a href="https://tc39.github.io/ecma262/#sec-tostring">ToString</a></emu-xref>(? <emu-xref aoid="Invoke" id="_ref_442"><a href="https://tc39.github.io/ecma262/#sec-invoke">Invoke</a></emu-xref>(<var>nextElement</var>, <code>"toLocaleString"</code>, « <var>locales</var>, <var>options</var> »)).</li><li>Set <var>R</var> to the string-concatenation of <var>R</var> and <var>S</var>.</li></ol></li><li>Increase <var>k</var> by 1.</li></ol></li><li>Return <var>R</var>.
      </li></ol></emu-alg>

      <emu-note><span class="note">Note 1</span><div class="note-contents">
        This algorithm's steps mirror the steps taken in  <emu-xref href="#sec-array.prototype.tolocalestring"><a href="https://tc39.github.io/ecma262/#sec-array.prototype.tolocalestring">22.1.3.27</a></emu-xref>, with the exception that <emu-xref aoid="Invoke" id="_ref_443"><a href="https://tc39.github.io/ecma262/#sec-invoke">Invoke</a></emu-xref>(<var>nextElement</var>, <code>"toLocaleString"</code>) now takes <var>locales</var> and <var>options</var> as arguments.

      </div></emu-note>

      <emu-note><span class="note">Note 2</span><div class="note-contents">
        The elements of the array are converted to Strings using their <emu-val>toLocaleString</emu-val> methods, and these Strings are then concatenated, separated by occurrences of a separator String that has been derived in an implementationdefined locale-specific way. The result of calling this function is intended to be analogous to the result of <emu-val>toString</emu-val>, except that the result of this function is intended to be locale-specific.

      </div></emu-note>

      <emu-note><span class="note">Note 3</span><div class="note-contents">
        The <code>toLocaleString</code> function is intentionally generic; it does not require that its <emu-val>this</emu-val> value be an Array object. Therefore it can be transferred to other kinds of objects for use as a method.

      </div></emu-note>

    </emu-clause>
  </emu-clause>
</emu-clause>
</emu-import>
<emu-import href="./annexes.html"><emu-annex id="annex-implementation-dependent-behaviour">
  <h1><span class="secnum">A</span>Implementation Dependent Behaviour</h1>

  <p>
    The following aspects of the ECMAScript 2019 Internationalization API Specification are implementation dependent:

  </p>

  <ul>
    <li>
      In all functionality:

      <ul>
        <li>
          Additional values for some properties of <var>options</var> arguments (<emu-xref href="#conformance" id="_ref_72"><a href="#conformance">2</a></emu-xref>)

        </li>
        <li>
          Canonicalization of extension subtag sequences beyond the rules of RFC 5646 (<emu-xref href="#sec-canonicalizelanguagetag" id="_ref_73"><a href="#sec-canonicalizelanguagetag">6.2.3</a></emu-xref>)

        </li>
        <li>
          The default locale (<emu-xref href="#sec-defaultlocale" id="_ref_74"><a href="#sec-defaultlocale">6.2.4</a></emu-xref>)

        </li>
        <li>
          The default time zone (<emu-xref href="#sec-defaulttimezone" id="_ref_75"><a href="#sec-defaulttimezone">6.4.3</a></emu-xref>)

        </li>
        <li>
          The set of available locales for each constructor (<emu-xref href="#sec-internal-slots" id="_ref_76"><a href="#sec-internal-slots">9.1</a></emu-xref>)

        </li>
        <li>
          The <emu-xref aoid="BestFitMatcher" id="_ref_444"><a href="#sec-bestfitmatcher">BestFitMatcher</a></emu-xref> algorithm (<emu-xref href="#sec-bestfitmatcher" id="_ref_77"><a href="#sec-bestfitmatcher">9.2.4</a></emu-xref>)

        </li>
        <li>
          The <emu-xref aoid="BestFitSupportedLocales" id="_ref_445"><a href="#sec-bestfitsupportedlocales">BestFitSupportedLocales</a></emu-xref> algorithm (<emu-xref href="#sec-bestfitsupportedlocales" id="_ref_78"><a href="#sec-bestfitsupportedlocales">9.2.8</a></emu-xref>)

        </li>
      </ul>
    </li>
    <li>
      In Collator:

      <ul>
        <li>
          Support for the Unicode extensions keys kn, kf and the parallel options properties numeric, caseFirst (<emu-xref href="#sec-initializecollator" id="_ref_79"><a href="#sec-initializecollator">10.1.1</a></emu-xref>)

        </li>
        <li>
          The set of supported <code>"co"</code> key values (collations) per locale beyond a default collation (<emu-xref href="#sec-intl-collator-internal-slots" id="_ref_80"><a href="#sec-intl-collator-internal-slots">10.2.3</a></emu-xref>)

        </li>
        <li>
          The set of supported <code>"kn"</code> key values (numeric collation) per locale (<emu-xref href="#sec-intl-collator-internal-slots" id="_ref_81"><a href="#sec-intl-collator-internal-slots">10.2.3</a></emu-xref>)

        </li>
        <li>
          The set of supported <code>"kf"</code> key values (case order) per locale (<emu-xref href="#sec-intl-collator-internal-slots" id="_ref_82"><a href="#sec-intl-collator-internal-slots">10.2.3</a></emu-xref>)

        </li>
        <li>
          The default search sensitivity per locale (<emu-xref href="#sec-intl-collator-internal-slots" id="_ref_83"><a href="#sec-intl-collator-internal-slots">10.2.3</a></emu-xref>)

        </li>
        <li>
          The sort order for each supported locale and options combination (<emu-xref href="#sec-collator-compare-functions" id="_ref_84"><a href="#sec-collator-compare-functions">10.3.3.1</a></emu-xref>)

        </li>
      </ul>
    </li>
    <li>
      In NumberFormat:

      <ul>
        <li>
          The set of supported <code>"nu"</code> key values (numbering systems) per locale (<emu-xref href="#sec-intl.numberformat-internal-slots" id="_ref_85"><a href="#sec-intl.numberformat-internal-slots">11.3.3</a></emu-xref>)

        </li>
        <li>
          The patterns used for formatting positive and negative values as decimal, percent, or currency values per locale (<emu-xref href="#sec-formatnumber" id="_ref_86"><a href="#sec-formatnumber">11.1.7</a></emu-xref>)

        </li>
        <li>
          Localized representations of <emu-val>NaN</emu-val> and <emu-val>Infinity</emu-val> (<emu-xref href="#sec-formatnumber" id="_ref_87"><a href="#sec-formatnumber">11.1.7</a></emu-xref>)

        </li>
        <li>
          The implementation of numbering systems not listed in  <emu-xref href="#table-numbering-system-digits" id="_ref_88"><a href="#table-numbering-system-digits">Table 3</a></emu-xref> (<emu-xref href="#sec-formatnumber" id="_ref_89"><a href="#sec-formatnumber">11.1.7</a></emu-xref>)

        </li>
        <li>
          Localized decimal and grouping separators (<emu-xref href="#sec-formatnumber" id="_ref_90"><a href="#sec-formatnumber">11.1.7</a></emu-xref>)

        </li>
        <li>
          Localized digit grouping schemata (<emu-xref href="#sec-formatnumber" id="_ref_91"><a href="#sec-formatnumber">11.1.7</a></emu-xref>)

        </li>
        <li>
          Localized currency symbols and names (<emu-xref href="#sec-formatnumber" id="_ref_92"><a href="#sec-formatnumber">11.1.7</a></emu-xref>)

        </li>
      </ul>
    </li>
    <li>In DateTimeFormat:

      <ul>
        <li>
          The <emu-xref aoid="BestFitFormatMatcher" id="_ref_446"><a href="#sec-bestfitformatmatcher">BestFitFormatMatcher</a></emu-xref> algorithm (<emu-xref href="#sec-initializedatetimeformat" id="_ref_93"><a href="#sec-initializedatetimeformat">12.1.1</a></emu-xref>)

        </li>
        <li>
          The set of supported <code>"ca"</code> key values (calendars) per locale (<emu-xref href="#sec-intl.datetimeformat-internal-slots" id="_ref_94"><a href="#sec-intl.datetimeformat-internal-slots">12.3.3</a></emu-xref>)

        </li>
        <li>
          The set of supported <code>"nu"</code> key values (numbering systems) per locale (<emu-xref href="#sec-intl.datetimeformat-internal-slots" id="_ref_95"><a href="#sec-intl.datetimeformat-internal-slots">12.3.3</a></emu-xref>)

        </li>
        <li>
          The default hourCycle setting per locale (<emu-xref href="#sec-intl.datetimeformat-internal-slots" id="_ref_96"><a href="#sec-intl.datetimeformat-internal-slots">12.3.3</a></emu-xref>)

        </li>
        <li>
          The set of supported date-time formats per locale beyond a core set, including the representations used for each component and the associated patterns (<emu-xref href="#sec-intl.datetimeformat-internal-slots" id="_ref_97"><a href="#sec-intl.datetimeformat-internal-slots">12.3.3</a></emu-xref>)

        </li>
        <li>
          Localized weekday names, era names, month names, am/pm indicators, and time zone names (<emu-xref href="#sec-formatdatetime" id="_ref_98"><a href="#sec-formatdatetime">12.1.7</a></emu-xref>)

        </li>
        <li>
          The calendric calculations used for calendars other than <code>"gregory"</code>, and adjustments for local time zones and daylight saving time (<emu-xref href="#sec-formatdatetime" id="_ref_99"><a href="#sec-formatdatetime">12.1.7</a></emu-xref>)

        </li>
      </ul>
    </li>
    <li>
      In PluralRules:

      <ul>
        <li>
          <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">List</a></emu-xref> of Strings representing the possible results of plural selection and their corresponding order per locale. (<emu-xref href="#sec-initializepluralrules" id="_ref_100"><a href="#sec-initializepluralrules">13.1.1</a></emu-xref>)

        </li>
      </ul>
    </li>
  </ul>
</emu-annex>

<emu-annex id="annex-incompatibilities">
  <h1><span class="secnum">B</span>Additions and Changes That Introduce Incompatibilities with Prior Editions</h1>

  <ul>
    <li>
      <emu-xref href="#sec-the-intl-collator-constructor" id="_ref_101"><a href="#sec-the-intl-collator-constructor">10.1</a></emu-xref>,  <emu-xref href="#sec-intl-numberformat-constructor" id="_ref_102"><a href="#sec-intl-numberformat-constructor">11.2</a></emu-xref>,  <emu-xref href="#sec-intl-datetimeformat-constructor" id="_ref_103"><a href="#sec-intl-datetimeformat-constructor">12.2</a></emu-xref> In ECMA-402, 1st Edition, constructors could be used to create Intl objects from arbitrary objects. This is no longer possible in 2nd Edition.

    </li>
    <li>
      <emu-xref href="#sec-intl.datetimeformat.prototype.format" id="_ref_104"><a href="#sec-intl.datetimeformat.prototype.format">12.4.3</a></emu-xref> In ECMA-402, 1st Edition, the <var>length</var> property of the function object <var>F</var> was set to 0. In 2nd Edition, <var>length</var> is set to 1.

    </li>
  </ul>
</emu-annex>
</emu-import>
<emu-import href="./colophon.html"><emu-annex id="sec-colophon">
  <h1><span class="secnum">C</span>Colophon</h1>
  <p>This specification is authored on  <a href="https://github.com/tc39/ecma402">GitHub</a> in a plaintext source format called  <a href="https://github.com/bterlson/ecmarkup">Ecmarkup</a>. Ecmarkup is an HTML and Markdown dialect that provides a framework and toolset for authoring ECMAScript specifications in plaintext and processing the specification into a full-featured HTML rendering that follows the editorial conventions for this document. Ecmarkup builds on and integrates a number of other formats and technologies including  <a href="https://github.com/rbuckton/grammarkdown">Grammarkdown</a> for defining syntax and  <a href="https://github.com/domenic/ecmarkdown">Ecmarkdown</a> for authoring algorithm steps. PDF renderings of this specification are produced by printing the HTML rendering to a PDF.</p>
  <p>Prior editions of this specification were authored using Word—the Ecmarkup source text that formed the basis of this edition was produced by converting the ECMAScript 2015 Word document to Ecmarkup using an automated conversion tool.</p>
</emu-annex><emu-annex id="sec-copyright-and-software-license">
      <h1><span class="secnum">D</span>Copyright &amp; Software License</h1>
      <p class="ECMAaddress">Ecma International</p>
<p class="ECMAaddress">Rue du Rhone 114</p>
<p class="ECMAaddress">CH-1204 Geneva</p>
<p class="ECMAaddress">Tel: +41 22 849 6000</p>
<p class="ECMAaddress">Fax: +41 22 849 6001</p>
<p class="ECMAaddress">Web:  <a href="https://ecma-international.org/">https://ecma-international.org/</a></p>

      <h2>Copyright Notice</h2>
      <p>© 2018 Ecma International</p>

<p>This draft document may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published, and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this section are included on all such copies and derivative works. However, this document itself may not be modified in any way, including by removing the copyright notice or references to Ecma International, except as needed for the purpose of developing any document or deliverable produced by Ecma International.</p>

<p>This disclaimer is valid only prior to final version of this document. After approval all rights on the standard are reserved by Ecma International.</p>

<p>The limited permissions are granted through the standardization phase and will not be revoked by Ecma International or its successors or assigns during this time.</p>

<p>This document and the information contained herein is provided on an "AS IS" basis and ECMA INTERNATIONAL DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY OWNERSHIP RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.</p>

      <h2>Software License</h2>
      <p>All Software contained in this document ("Software") is protected by copyright and is being made available under the "BSD License", included below. This Software may be subject to third party rights (rights from parties other than Ecma International), including patent rights, and no licenses under such third party rights are granted under this license even if the third party concerned is a member of Ecma International. SEE THE ECMA CODE OF CONDUCT IN PATENT MATTERS AVAILABLE AT https://ecma-international.org/memento/codeofconduct.htm FOR INFORMATION REGARDING THE LICENSING OF PATENT CLAIMS THAT ARE REQUIRED TO IMPLEMENT ECMA INTERNATIONAL STANDARDS.</p>

<p>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:</p>

<ol>
  <li>Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.</li>
  <li>Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.</li>
  <li>Neither the name of the authors nor Ecma International may be used to endorse or promote products derived from this software without specific prior written permission.</li>
</ol>

<p>THIS SOFTWARE IS PROVIDED BY THE ECMA INTERNATIONAL "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ECMA INTERNATIONAL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p>

    </emu-annex>
</emu-import>
</div></body>